[issue17748] Condition.wait timeout can't be set to more than 50 ms

Antoine Pitrou report at bugs.python.org
Tue Apr 16 11:45:02 CEST 2013


Antoine Pitrou added the comment:

Locks in 2.7 don't support a timeout, which is why Condition.wait has a polling loop. The comment explains it all:

 # Balancing act:  We can't afford a pure busy loop, so we
 # have to sleep; but if we sleep the whole timeout time,
 # we'll be unresponsive. 

Lock timeouts are a new feature in 3.2 and therefore won't be backported in 2.7, which is in bugfix mode. Consider it a good reason to switch to 3.x :-)

(yes, we are aware about the power consumption issue)

----------
nosy: +pitrou
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list