Skip to content

bpo-30886: Fix multiprocessing.Queue.join_thread() #2642

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
Jul 10, 2017
Merged

bpo-30886: Fix multiprocessing.Queue.join_thread() #2642

merged 1 commit into from
Jul 10, 2017

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jul 10, 2017

multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)

@vstinner vstinner requested review from applio and pitrou July 10, 2017 09:24
@mention-bot
Copy link

@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @cf-natali and @shibturn to be potential reviewers.

@vstinner
Copy link
Member Author

Sorry, I don't understand well the purpose of created_by_this_process, so I didn't write a proper commit message yet.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

This needs a NEWS blurb, otherwise looks ok to me.

multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
@vstinner
Copy link
Member Author

This needs a NEWS blurb, otherwise looks ok to me.

Ok, done.

@vstinner vstinner merged commit 3b69d91 into python:master Jul 10, 2017
@bedevere-bot
Copy link

GH-2643 is a backport of this pull request to the 3.6 branch.

@bedevere-bot
Copy link

GH-2644 is a backport of this pull request to the 3.5 branch.

@vstinner vstinner deleted the mp_queue_join_thread branch July 10, 2017 10:47
vstinner added a commit that referenced this pull request Jul 10, 2017
multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
(cherry picked from commit 3b69d91)
vstinner added a commit that referenced this pull request Jul 10, 2017
multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
(cherry picked from commit 3b69d91)
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.

5 participants