Issue 3138: Hang when calling get() on an empty queue in the queue module
Created on 2008-06-19 08:08 by slash2314, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg68393 - (view) | Author: Dex (slash2314) | Date: 2008-06-19 08:08 | |
This behavior appears in Python 3.0b1. If you use queue.Queue and call the get method on the empty queue, it appears to hang. The same behavior seems to be evident in the PriorityQueue too. |
|||
| msg68396 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * ![]() |
Date: 2008-06-19 09:32 | |
2.5 has the same behavior: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import Queue >>> q = Queue.Queue() >>> q.get() .... block forever ... Did you get different results? |
|||
| msg68401 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-06-19 12:49 | |
It's intended that Queue.get blocks until something is put on the Queue. If you don't want it to block use Queue.get(False). |
|||
| msg84269 - (view) | Author: Tuure Laurinolli (tazle) | Date: 2009-03-27 16:07 | |
Is it also intended that Queue.get() eats SIGINTs, requiring one to kill the process with something heavier? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:35 | admin | set | github: 47388 |
| 2009-03-27 16:07:11 | tazle | set | nosy:
+ tazle messages: + msg84269 |
| 2008-06-19 12:49:02 | benjamin.peterson | set | status: open -> closed resolution: not a bug messages: + msg68401 nosy: + benjamin.peterson |
| 2008-06-19 09:32:27 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg68396 |
| 2008-06-19 08:08:16 | slash2314 | create | |
