Antoine Pitrou <pit...@free.fr> added the comment: Le mercredi 11 avril 2012 à 10:50 +0000, Kristján Valur Jónsson a écrit : > > 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.
No, it is not "left undefined". If the documentation doesn't say spurious wakeups may occur, then they are not supposed to occur. Predictable behaviour is a good thing for users. > 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. Which options? > This is also why we, IMHO, shouldn't rely on this behaviour in the > unittests. Disagreed. Unit tests should definitely protect against the introduction of bugs (willingly or not). And unpredictable behaviour is usually considered a bug. If you think the condition variable specification should be changed, you can always ask for approval on python-dev. But I don't even see the point: you are not demonstrating any *practical* advantage in doing so. ---------- _______________________________________ 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