I'd just like to point out that Queue is not quite as useful as people
seem to think in this thread. The main problem is that I can't
integrate Queue into a select/poll based main loop.
The other day I wanted extended a python main loop, which uses poll(),
to be thread safe, so I could queue
The multi-processing discussion reminded me that I have a few problems I run
into every time I try to use Queue objects.
My first problem is finding it:
Py from threading import Queue # Nope
Traceback (most recent call last):
File stdin, line 1, in ?
ImportError: cannot import name Queue
Py
On 10/11/05, Nick Coghlan [EMAIL PROTECTED] wrote:
The multi-processing discussion reminded me that I have a few problems I run
into every time I try to use Queue objects.
My first problem is finding it:
Py from threading import Queue # Nope
Traceback (most recent call last):
File
Guido van Rossum [EMAIL PROTECTED] wrote:
Optionally, the existing put and get methods could be deprecated, with
the
goal of eventually changing their signature to match the put_wait and
get_wait
methods above.
Apart from trying to guess the API without reading the docs (:-), what
[Guido]
Apart from trying to guess the API without reading the docs (:-), what
are the use cases for using put/get with a timeout? I have a feeling
it's not that common.
[Josiah Carlson]
With timeout=0, a shared connection/resource pool (perhaps DB, etc., I
use one in the tuple space
On 10/11/05, Tim Peters [EMAIL PROTECTED] wrote:
Guido understands use cases for blocking and non-blocking put/get, and
Queue always supported those possibilities. The timeout argument got
added later, and it's not really clear _why_ it was added. timeout=0
isn't a sane use case (because the
[Guido]
Apart from trying to guess the API without reading the docs (:-), what
are the use cases for using put/get with a timeout? I have a feeling
it's not that common.
[Josiah Carlson]
With timeout=0, a shared connection/resource pool (perhaps DB, etc., I
use one in the tuple space