[New-bugs-announce] [issue8844] Condition.wait() doesn't raise KeyboardInterrupt

Mike Hobbs report at bugs.python.org
Fri May 28 18:48:12 CEST 2010


New submission from Mike Hobbs <mhobbs at alvenda.com>:

Condition.wait() without a timeout will never raise a KeyboardInterrupt:

cond = threading.Condition()
cond.acquire()
cond.wait()

*** Pressing Ctrl-C now does nothing ***



If you pass a timeout to Condition.wait(), however, it does behave as expected:

cond.wait()

^CTraceback (most recent call last):
  File "/usr/lib/python3.1/threading.py", line 242, in wait
    _sleep(delay)
KeyboardInterrupt



This may affect other problems reported with multiprocessing pools. Most notably:
http://bugs.python.org/issue8296
http://stackoverflow.com/questions/1408356

----------
components: Library (Lib)
messages: 106678
nosy: hobb0001
priority: normal
severity: normal
status: open
title: Condition.wait() doesn't raise KeyboardInterrupt
type: behavior
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8844>
_______________________________________


More information about the New-bugs-announce mailing list