This bit of code hangs Python Indefinitely

Duncan Booth duncan.booth at invalid.invalid
Wed Aug 8 16:52:39 CEST 2007


brad <byte8bits at gmail.com> wrote:

> Chris Mellon wrote:
> 
>> ... the producer is designed to block if
>> the queue is full. You can use the put_nowait method to have it raise
>> an exception instead of blocking.
> 
> I assumed that the behavior would have been the other way around. I 
> should not have made that assumption.
> 

You could possibly make a case that before Queue.put blocks it should check 
whether the program has more than just the one thread and if not it should 
raise an RTFMException.



More information about the Python-list mailing list