Kristján Valur Jónsson <krist...@ccpgames.com> added the comment:

> But, once again, "the condition may not yet hold true" is false.
In our current implementation, yes.  But it is intentionally left undefined in 
the specification of the condition variable protocol, for very good reasons.
While I'm fine with not mentioning it in the docs, I would be very much against 
us actually specifying the opposite (that early wakeups never occur) because 
this will unnecessarily limit our options.  Since the while() loop pattern is 
already recommended because of the "stolen wakeup" problem, leaving the 
"early/spurious" wakeup behaviour" undefined is wise, since there is nothing to 
be gained by actually guaranteeing that there will be no early wakeups.  This 
is just good software engineering practice.

This is also why we, IMHO, shouldn't rely on this behaviour in the unittests.  
One should never write tests that depend on unspecified behaviour, again, good 
engineering practice.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8799>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to