[New-bugs-announce] [issue1360] Queue.get() can't be interrupted with Ctrl-C unless timed out
Daniele Varrazzo
report at bugs.python.org
Tue Oct 30 01:06:30 CET 2007
New submission from Daniele Varrazzo:
This issue probably depends on #1167930
When waiting on a queue in blocking mode, in no timeout is set, ctrl-C
doesn't raise KeyboardInterrupt::
q = Queue()
q.get(True)
# ctrl-c doesn't work here
If any timeout is set, ctrl-c works as expected::
q = Queue()
ONEYEAR = 365 * 24 * 60 * 60
q.get(True, ONEYEAR)
# ctrl-c works here
Traceback (most recent call last):
File "queuebug.py", line 6, in <module>
q.get(True, ONEYEAR)
File "/usr/lib/python2.5/Queue.py", line 174, in get
self.not_empty.wait(remaining)
File "/usr/lib/python2.5/threading.py", line 233, in wait
_sleep(delay)
KeyboardInterrupt
----------
components: Library (Lib)
messages: 56942
nosy: piro
severity: normal
status: open
title: Queue.get() can't be interrupted with Ctrl-C unless timed out
type: behavior
versions: Python 2.5
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1360>
__________________________________
More information about the New-bugs-announce
mailing list