Queue woes

Tim Peters tim_one at email.msn.com
Thu Aug 24 00:55:12 EDT 2000


[Roy Katz]
> I opened python and typed the following:
>
>   >>> import Queue
>   >>> f = Queue.Queue(5)
>   >>> f.get()
>
> After which python hung (hanged).  es bin gehangen.
> This looks to be at odds with the documentation(lib-ref, section 7.6)
> which states that an "Exception raised when non-blocking get() (or
> get_nowait()) is called on a Queue object which is empty or locked. "

[and later]
> I apologise, Queue *blocks* until an item is ready, isn't that clever.

You're not done reading the docs yet, Roy <wink>:  Queue offers both
blocking and non-blocking forms of .get() and .put().  Keep reading.  The
light will dawn.






More information about the Python-list mailing list