8000 bpo-38707: Fix for multiprocessing.Process MainThread.native_id by jaketesler · Pull Request #17088 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-38707: Fix for multiprocessing.Process MainThread.native_id #17088

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 9 commits into from
Nov 19, 2019
Prev Previous commit
Next Next commit
Skip test if type is 'threads'
Since Dummy Processes are simply Thread objects,
they will share a MainThread and their native_id attribute will match.
  • Loading branch information
jaketesler committed Nov 8, 2019
commit e71cb78520481c55f3b231cd36401ee623d69bf6
3 changes: 3 additions & 0 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ def test_process(self):

if threading._HAVE_THREAD_NATIVE_ID:
def test_process_thread_attributes(self):
if self.TYPE == 'threads':
self.skipTest('test not appropriate for {}'.format(self.TYPE))

current_mainthread_native_id = threading.main_thread().native_id

q = self.Queue(1)
Expand Down
0