Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Program blocked in Queue.Queue.get and Queue.Queue.put

Reply
Thread Tools

Program blocked in Queue.Queue.get and Queue.Queue.put

 
 
Kris
Guest
Posts: n/a
 
      01-04-2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Site to open blocked sites, and prohibited and encoded porxy Python 1 10-15-2011 08:49 AM
Site to open the blocked sites and blocked and encoded alagmy2030 Javascript 0 02-11-2011 11:54 PM
New site to open blocked sites, and prohibited and encoded alagmy Cisco 0 10-27-2010 10:23 PM
Outgoing email blocked by spam program I don't have???? Jim Beaver Computer Support 12 10-08-2008 10:43 AM
my program be blocked by inputstream ><~~ Boki Java 2 10-31-2005 02:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57