Raymond Hettinger added the comment:
It's been 4 1/2 years since last activity. Marking as closed again due to lack
of interest and due to the rarity of need. Also we know that a person can
already customize join() via a subclass.
--
resolution: -> out of date
stage: needs patch
Swen Wenzel added the comment:
I have another use case.
The Docs use the producer-consumer pattern as a usage example.
I'm also using this pattern but apparently the consumers are not that stable
during development phase.
So if one of your consumers dies during execution of its task, before it
Changes by Yuri Bochkarev baltazar...@gmail.com:
--
nosy: +Yuri.Bochkarev
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
___
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
___
Python-bugs-list
Nick Coghlan ncogh...@gmail.com added the comment:
The thread pool impl where I'm using this:
http://git.fedorahosted.org/git/?p=pulpdist.git;a=blob;f=src/pulpdist/cli/thread_pool.py
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Nick, why don't you submit your workaround as a patch to Queue.join()?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
Nick Coghlan ncogh...@gmail.com added the comment:
I probably will eventually - I'll be playing catchup a bit on other tasks this
month after doing almost no coding for CPython since some time in Feb.
--
___
Python tracker rep...@bugs.python.org
Changes by Matt Joiner anacro...@gmail.com:
--
nosy: +anacrolix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
___
Python-bugs-list
Nick Coghlan ncogh...@gmail.com added the comment:
I just created #14487 to request a documented API (Queue.pending()) that
provides a formal mechanism for asking whether or not any jobs are still
pending (analagous to the existing empty() and full() query methods).
Specifically, what I have
Nick Coghlan ncogh...@gmail.com added the comment:
I killed off my new issue in favour of this one, since they're covering the
same ground.
--
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
The function below is the workaround I plan to use based on the
undocumented-but-public Thread attributes that relate to the task queue (it's
essentially just a combination of Queue.join() with the existing structure of
the Queue.get()
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Kelly, thanks for posting the idea.
I'm going to close this one for now
but it can be reopened if compelling
use cases arise.
--
resolution: - rejected
status: open - closed
___
New submission from Kelly Lucas kdlu...@gmail.com:
I've seen quite a few people requesting to add a timeout value to the
Queue.join() method, as it seems like a nice feature to have when waiting for
queue's to finish.
Please add a feature so that Queue.join() will issue a
Changes by Kelly Lucas kdlu...@gmail.com:
--
versions: +Python 3.1 -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
___
Changes by Brian Curtin cur...@acm.org:
--
stage: - needs patch
type: - feature request
versions: +Python 3.2 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Can you provide links to the other requests?
This seems to be at odds with the whole premise
of what Queue.join() is trying to do (wait until
all worker threads have marked their tasks as done).
--
assignee: -
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
FWIW, if you want to do other tasks in a main thread and need to check on the
status task completion in worker threads, you can already loop on:
while q.unfinished_tasks:
do_other_fun_stuff()
q.join()
Kelly Lucas kdlu...@gmail.com added the comment:
Here are a few that I saw:
http://stackoverflow.com/questions/1564501/add-timeout-argument-to-pythons-queue-join
http://www.eggheadcafe.com/software/aspnet/36145181/max-time-threads.aspx
Antoine Pitrou pit...@free.fr added the comment:
We already have an optional timeout on threading.Thread.join(), which I suppose
means that people need/want that feature.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
One of the provided links is duplicate (repost from StackOverflow). None of
the links offer use cases which can be used to inform the design (i.e. is this
the correct approach, should a timeout raise a RuntimeError like
Kelly Lucas kdlu...@gmail.com added the comment:
This is easy enough to implement by subclassing the Queue class and overriding
join(), so it's not a big deal. Just seems like it would be a nice thing to
have.
--
___
Python tracker
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I will leave this open for a while.
It may be that it is a good idea
and that some good use cases will
emerge to inform a correct design.
In the meantime, it would be great
if you could post your subclass to
the ASPN Cookbook
22 matches
Mail list logo