[issue1674032] Make threading.Event().wait(timeout=3) return isSet
Guido van Rossum
report at bugs.python.org
Mon Mar 30 17:53:26 CEST 2009
Guido van Rossum <guido at python.org> added the comment:
Looking at this, I think this change is fine. The _Event class itself
holds the condition that it's checking for, and the is_set() method
doesn't acquire the lock, so there's no reason to prefer
e.wait()
if e.is_set():
GOT_IT()
over
if e.wait():
GOT_IT()
IOW Tim's reasoning in #1175933 for rejecting a similar change to
_Condition.wait() doesn't apply here. I think we can go ahead without
waiting for Tim to confirm this.
----------
nosy: +gvanrossum
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1674032>
_______________________________________
More information about the Python-bugs-list
mailing list