Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Program blocked in Queue.Queue.get and Queue.Queue.put (http://www.velocityreviews.com/forums/t807665-program-blocked-in-queue-queue-get-and-queue-queue-put.html)

Kris 01-04-2012 03:46 PM

Program blocked in Queue.Queue.get and Queue.Queue.put
 
I have a program that is blocked and all threads are blocked on a
Queue.Queue.get or Queue.Queue.put method (on the same Queue.Queue
object).

1 thread shows the below as its last entry in the stack:
File: "c:\python27\lib\Queue.py", line 161, in get
self.not_empty.acquire()

2 threads show the below as its last entry in the stack:
File: "c:\python27\lib\Queue.py", line 118, in put
self.not_full.acquire()

According to me, this means both the Queue.Queue.not_full and
Queue.Queue.not_empty locks are taken, but no other thread seems to
have it. Of course, I don't access the locks my self directly.

I did send an KeyboardInterrupt to the main thread however. Could it
be that it was at that moment doing a Queue.Queue.put and it got
interrupted while it has the lock, but before it entered the try block
with the finally that releases the lock (so between line 118 and 119
in the Queue.py file)?

If this is the case, how do I avoid that? Or is it a bug in the
Queue.Queue class?
If this is not the case, any clue what else could have happened?

Thanks


All times are GMT. The time now is 10:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.