Peter Otten <[EMAIL PROTECTED]> wrote: > placid wrote: > > > I have a thread that has a job Queue, it continuosly polls this queue > > to see if there are any jobs for it, what i really wont to be able to > > do is, when the queue is empty, i want the thread to pause (or more > > technical, i want the thread to block) until the queue gets populated > > again. Is this possible ? > > Isn't that the default behaviour of Queue.get()?
Absolutely! placid, just call the get method of that Queue instance: if the queue is empty your thread DOES pause, or block, until there's some item put on the queue by another thread. Alex -- http://mail.python.org/mailman/listinfo/python-list