-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-60187 Added timeout to queue join function. #92017
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
Conversation
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
|
Every change to Python requires a NEWS entry. Please, add it using the blurb_it Web app or the blurb command-line tool. |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
orsenthil
left a comment
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.
Timeout is disruptive in the queue operation. This needs to be discussed before any review and acceptance.
Issue ticket - #60187
|
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 |
|
No problem with that. Put and get have timeout too. It looks like it is missing requested feature since ~2012. As mentioned no problem to move it into its own function, but this looked more correct to me personally. |
|
I appreciate the PR but don't think this should be added. The need is somewhat rare and we've done fine without it since 2010, nor has it been an issue with the matching API in multiprocessing. The put() and get() methods need timeouts because they are more find-grained than join() which is used much differently. See previous discussion at https://bugs.python.org/issue9634 Without likely and compelling use cases, we should leave this out. During the design discussion for SimpleQueue, Guido voiced an objection to having more sophisticated "task management" as part of the Queue API. Users have many options for communicating task completion including Condition variables, share counters, reply queues, etc. |
|
It looks like you don't like consistent API. For example thread.join has timeout. I would expect same here. |
Signed-off-by: Cervenka Dusan cervenka@acrios.com