]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 1 Jun 2019 09:36:29 +0000 (02:36 -0700)
committerGitHub <noreply@github.com>
Sat, 1 Jun 2019 09:36:29 +0000 (02:36 -0700)
commitf286e0373feda0955c910a9fe4ef99cd2c40969e
tree50a943019b41b88ac3337cab94e898e9482166c6
parent18e23f227be59241cbb1eeb6d6669771dd7275fb
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)

Fixed QueueListener in order to avoid random deadlocks.
Unable to add regression tests atm due to time constraints, will add it in a bit.
Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO).

https://bugs.python.org/issue36813
(cherry picked from commit 6b282e18877ec84e927b381b4ce187eaf4ba3dd7)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
Lib/logging/handlers.py
Lib/test/test_logging.py
Misc/NEWS.d/next/Library/2019-05-06-18-28-38.bpo-36813.NXD0KZ.rst [new file with mode: 0644]