-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-120012: clarify the behaviour of multiprocessing.Queue.empty
on closed queues.
#120102
Conversation
Ok, there are strange things happening there. I'm no longer able to reproduce the OSError locally so I'll try to investigate what happened. EDIT: I managed to fix them locally. It appears that the interpreter did not require the explicit Maybe someone can explain to me why I managed to raise the OSError without that call and if I should actually update the docs accordingly (my feeling is that the feeder thread might be closed but not terminated, in which case |
@ericvsmith since you commented on the issue, I would like to know whether you would be available for reviewing it. Thank you in advance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small suggestions.
Misc/NEWS.d/next/Documentation/2024-06-05-12-36-18.gh-issue-120012.f14DbQ.rst
Outdated
Show resolved
Hide resolved
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Thank you Eric for your suggestions. I have made the requested changes; please review again. |
Thanks for making the requested changes! @ericvsmith: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
further doc simplification to alleviate confusion.
…y` on closed queues. (pythonGH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues (cherry picked from commit a3711af) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
GH-120469 is a backport of this pull request to the 3.13 branch. |
…y` on closed queues. (pythonGH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues (cherry picked from commit a3711af) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
GH-120470 is a backport of this pull request to the 3.12 branch. |
…y` on closed queues. (pythonGH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues Co-authored-by: Gregory P. Smith <[email protected]>
…y` on closed queues. (pythonGH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues Co-authored-by: Gregory P. Smith <[email protected]>
…ty` on closed queues. (GH-120102) (#120469) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
…ty` on closed queues. (GH-120102) (#120470) Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Gregory P. Smith <[email protected]>
…y` on closed queues. (pythonGH-120102) * improve doc for `multiprocessing.Queue.empty` * add tests for checking emptiness of queues Co-authored-by: Gregory P. Smith <[email protected]>
I took the liberty of clarifying the behaviour of
SimpleQueue
andJoinableQueue
as well sinceSimpleQueue
is a bit different.I tested the behaviour on main, so I'm not entirely sure that it's the same on the previous versions, and that's why I added some tests for that.
multithreading.Queue.empty()
when the Queue is closed is not explained in the docs #120012📚 Documentation preview 📚: https://cpython-previews--120102.org.readthedocs.build/