"Jonathan Amsterdam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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. >
Ah, I get it now, and yes as you describe it, this is a deadlock. But why do you need both mutex M and a Queue, then? You should release M before calling Queue.get(). Then if you need to, you should reacquire it afterward. -- Paul -- http://mail.python.org/mailman/listinfo/python-list