Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.8] bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)#17261

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedNov 19, 2019
edited
Loading

This PR implements a fix formultiprocessing.Process objects; the error occurs when Processes are created using eitherfork orforkserver as thestart_method.

In these instances, theMainThread of the newly createdProcess object retains all attributes from its parent'sMainThread object, including thenative_id attribute. The resulting behavior is such that the new process'MainThread captures an incorrect/outdatednative_id (the parent's instead of its own).

This change forces the Process object to update itsnative_id attribute during the bootstrap process.

cc@vstinner

https://bugs.python.org/issue38707

Automerge-Triggered-By:@pitrou
(cherry picked from commitc6b20be)

Co-authored-by: Jake Teslerjake.tesler@gmail.com

https://bugs.python.org/issue38707

Automerge-Triggered-By:@pitrou

…onGH-17088)This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`.In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own).This change forces the Process object to update its `native_id` attribute during the bootstrap process.cc@vstinnerhttps://bugs.python.org/issue38707Automerge-Triggered-By:@pitrou(cherry picked from commitc6b20be)Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
Copy link
Member

@pitroupitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

+1

@miss-islington
Copy link
ContributorAuthor

@jaketesler: Status check is done, and it's a success ✅ .

@miss-islingtonmiss-islington merged commit829593a intopython:3.8Nov 19, 2019
@miss-islingtonmiss-islington deleted the backport-c6b20be-3.8 branchNovember 19, 2019 20:11
@miss-islington
Copy link
ContributorAuthor

@jaketesler: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
ContributorAuthor

@jaketesler: Status check is done, and it's a success ✅ .

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pitroupitroupitrou approved these changes

Assignees
No one assigned
Labels
type-bugAn unexpected behavior, bug, or error
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@miss-islington@pitrou@the-knights-who-say-ni@bedevere-bot@jaketesler

[8]ページ先頭

©2009-2025 Movatter.jp