Skip to content

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