On Mon, Apr 17, 2006 at 09:41:37AM -0700, Jonathan Amsterdam wrote: > If you don't want to call it deadlock, fine, but the program execution > I describe will make no progress to the end of time. Thread 2 can never > put anything in the queue, because Thread 1 holds M, and Thread 1 will > never release M because that can only happen if someone puts something > on the queue. > Right, the problem isn't with Queue it is with your global lock M. Here is the pseudo code for your program:
acquire_lock("No_one_else_can_do_anything") wait_for_someone_else_to_do_something() # waits forever -Jack -- http://mail.python.org/mailman/listinfo/python-list