This bit of code hangs Python Indefinitely

Steve Holden steve at holdenweb.com
Wed Aug 8 11:59:54 EDT 2007


brad wrote:
> Marc 'BlackJack' Rintsch wrote:
> 
>> Why did you put an upper bound to the queue?
> 
> For clarity. Explicit is better than implicit, right? In our design, the 
> queue should only have x number of things, so why not show that? Other 
> than that, the limit is arbitrary and is not needed.

Yes, but you are asking a bit more of Queue.Queue than its design is 
intended to provide. Normally a limit on the input side is used to allow 
the scheduling of a consumer thread that will remove items, thus 
allowing the producer to restart.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list