my threaded program hangs after calling Queue.join()
kushal.kumaran+python at gmail.com
Tue Apr 6 14:24:03 CEST 2010
On Tue, Apr 6, 2010 at 5:36 PM, Babu <babukk at gmail.com> wrote:
> I am not an expert in python, so any help is my appreciated. My
> threaded program consumed everything in the queue but is not
> exiting... What is the problem with this program?
See the example in the documentation of the queue module. There must
be a call to task_done for every put. You put the sentinel [None,
None] value, for which there will be no task_done call (because you
break out of the loop when you hit the sentinel).
> <snipped code>
More information about the Python-list