why the method get() of python Queue is hang on there?

zxo102 zxo102 at gmail.com
Mon Aug 14 11:35:14 EDT 2006


Thanks for your guys. I got it.  I thought  Queue can be used anywhere
in the code and the second b.get() would return a "None".

Ouyang


zxo102 写道:

> Hi,
>    I am using Queue from python2.4. Here is what happen to me:
>
> import Queue
> b = Queue.Queue(0)
> b.put(9999)
> b.get()   # this is ok, it pops out 9999
> b.get()   # this one does not return anything and is hang on there
> 
> Anybody knows what is going on with the second b.get()?
> 
> ouyang




More information about the Python-list mailing list