>>>>> grocery_stocker <cdal...@gmail.com> (g) wrote: >g> [cdal...@localhost ~]$ python >g> Python 2.4.3 (#1, Oct 1 2006, 18:00:19) >g> [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 >g> Type "help", "copyright", "credits" or "license" for more information. >>>>> import Queue >>>>> queue = Queue.Queue() >>>>> >>>>> while 1: >g> ... item = queue.get() >g> ... if item == 'done': >g> ... break >g> ... >g> this >g> is >g> a >g> test >g> done
>g> [3]+ Stopped python >g> [cdal...@localhost ~]$ kill %3 >g> It appears that only item = queue.get() called. Ie, the block never >g> advances to if item == 'done': >g> like in the first example You don't put anything in the queue here. The lines that you type there don't get magically into the queue. So therefore the queue.get blocks. -- Piet van Oostrum <p...@cs.uu.nl> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org -- http://mail.python.org/mailman/listinfo/python-list