Skip to content

bpo-40089: Fix threading._after_fork() #19191

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

Merged
merged 1 commit into from
Mar 27, 2020
Merged

bpo-40089: Fix threading._after_fork() #19191

merged 1 commit into from
Mar 27, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 27, 2020

If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.

https://bugs.python.org/issue40089

If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
@vstinner
Copy link
Member Author

See https://bugs.python.org/issue40089#msg365165 for the rationale of this change.

@vstinner vstinner merged commit d8ff44c into python:master Mar 27, 2020
@vstinner vstinner deleted the at_fork_dummy branch March 27, 2020 16:50
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 27, 2020
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44c)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-bot
Copy link

GH-19193 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 27, 2020
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44c)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-bot
Copy link

GH-19194 is a backport of this pull request to the 3.8 branch.

vstinner added a commit that referenced this pull request Apr 7, 2020
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44c)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this pull request Apr 7, 2020
If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44c)

Co-authored-by: Victor Stinner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants