Message157944
| Author |
pitrou |
| Recipients |
csernazs, jyasskin, kristjan.jonsson, neologix, pitrou |
| Date |
2012年04月10日.10:38:58 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334054009.3389.5.camel@localhost.localdomain> |
| In-reply-to |
<1334052321.23.0.196121442961.issue8799@psf.upfronthosting.co.za> |
| Content |
> The Condition variables are canonically prone to "spurious wakeups"
> and "stolen wakeups".
No, they aren't. Just because POSIX says they are doesn't mean *our*
condition variables are the same. Spurious wakeups are an annoyance, and
our implementation AFAICT never exhibited them.
> From the docs: "Note: Condition variables can be, depending on the
> implementation, subject to both spurious wakeups (when wait() returns
> without a notify() call) and stolen wakeups (when another thread
> acquires the lock before the awoken thread.) For this reason, it is
> always necessary to verify the state the thread is waiting for when
> wait() returns and optionally repeat the call as often as necessary."
Ah, thanks, indeed. Except that...
this was added by yourself in 483bbebc57bf, after issue 10260, but
*without* being part of the original patch that you uploaded on that
issue.
So this never got reviewed and was instead sneaked in the docs in a
commit of yours.
Unless other people disagree, I think this addition should be reverted. |
|