Message158020
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. |
|
Date |
User |
Action |
Args |
2012-04-11 11:00:02 | pitrou | set | recipients:
+ pitrou, csernazs, kristjan.jonsson, jyasskin, neologix, python-dev |
2012-04-11 11:00:01 | pitrou | link | issue8799 messages |
2012-04-11 11:00:01 | pitrou | create | |
|