gh-107219: Fix concurrent.futures terminate_broken() by vstinner · Pull Request #108974 · python/cpython · GitHub
Skip to content

gh-107219: Fix concurrent.futures terminate_broken()#108974

Merged
vstinner merged 1 commit intopython:mainfrom
vstinner:test_concurrent_futures
Sep 6, 2023
Merged

gh-107219: Fix concurrent.futures terminate_broken()#108974
vstinner merged 1 commit intopython:mainfrom
vstinner:test_concurrent_futures

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Sep 6, 2023

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.

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.
@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Sep 6, 2023

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Sep 6, 2023

cc @pitrou

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Sep 6, 2023

@vstinner vstinner merged commit a8cae40 into python:main Sep 6, 2023
@vstinner vstinner deleted the test_concurrent_futures branch September 6, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants