my threaded program hangs after calling Queue.join()
Kushal Kumaran
kushal.kumaran+python at gmail.com
Tue Apr 6 08:24:03 EDT 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>
--
regards,
kushal
More information about the Python-list
mailing list