]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-33110: Catch errors raised when running add_done_callback on already completed...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 22 May 2019 22:02:24 +0000 (15:02 -0700)
committerGitHub <noreply@github.com>
Wed, 22 May 2019 22:02:24 +0000 (15:02 -0700)
commitb73c21c0be7b42de6a88d67408249c8ec46e28f7
tree95f2946bedd60e879e9b010fd7c96e3267216357
parent34bab215596671d0dec2066ae7d7450cd73f638b
bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141)

Wrap the callback call within the `add_done_callback` function within concurrent.futures, in order to behave in an identical manner to callbacks added to a running future are triggered once it has completed.
(cherry picked from commit 2a3a2ece502c05ea33c95dd0db497189e0354bfd)

Co-authored-by: Sam Martin <ABitMoreDepth@users.noreply.github.com>
Lib/concurrent/futures/_base.py
Lib/test/test_concurrent_futures.py
Misc/NEWS.d/next/Library/2019-05-06-22-34-47.bpo-33110.rSJSCh.rst [new file with mode: 0644]