Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-88110: clear concurrent.futures.thread._threads_queues after fork #101940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Lib/concurrent/futures/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def _python_exit():
os.register_at_fork(before=_global_shutdown_lock.acquire,
after_in_child=_global_shutdown_lock._at_fork_reinit,
after_in_parent=_global_shutdown_lock.release)
os.register_at_fork(after_in_child=_threads_queues.clear)


class _WorkItem(object):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix multiprocessing.Process exiting with code 1 even on successful run when
threads are used in the same application too.