Skip to content

Add _taskqueue to MP Pool #1884

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 1 commit into from
Closed

Add _taskqueue to MP Pool #1884

wants to merge 1 commit into from

Conversation

Sterbic
Copy link
Contributor

@Sterbic Sterbic commented Feb 15, 2018

Make the following snippet work correctly with mypy:

from multiprocessing import Pool
pool = Pool(1)
print(pool._taskqueue.empty())

@gvanrossum
Copy link
Member

Why do you want to add an undocumented internal?

@Sterbic
Copy link
Contributor Author

Sterbic commented Feb 16, 2018

I am debugging some race conditions when submitting jobs to an MP pool and ._taskqueue is useful to verify that a job is actually sent to a worker before the next on is submitted. I need to land code using it to gather data in prod so I though I'd rather send a PR than land it with a # type: ignore.

@gvanrossum
Copy link
Member

I don't think that argument is strong enough. Just add the # type: ignore.

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.

2 participants