]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-107219: Fix concurrent.futures terminate_broken() (#108974)
authorVictor Stinner <vstinner@python.org>
Wed, 6 Sep 2023 13:57:01 +0000 (15:57 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Sep 2023 13:57:01 +0000 (15:57 +0200)
commita8cae4071c795e55be46e339eda37e241fa0d7f8
treea91d0b46c6492d7fb090a1d5430acd95db27f979
parentb298b395e8ab1725c4f0dd736155b8c818664d42
gh-107219: Fix concurrent.futures terminate_broken() (#108974)

Fix a race condition in _ExecutorManagerThread.terminate_broken():
ignore the InvalidStateError on future.set_exception(). It can happen
if the future is cancelled before the caller.

Moreover, test_crash_big_data() now waits explicitly until the
executor completes.
Lib/concurrent/futures/process.py
Lib/test/test_concurrent_futures/test_deadlock.py