Commit 712879f1 authored by prashant.n's avatar prashant.n Committed by Commit bot

base: Update comment for ConditionVariable::Wait() function.

Currently it sounds like Wait() will return only iff the CV is
signaled. But as wait functions are susceptible to spurious wakeups,
it may make them singalled before actual signal gets triggered.

BUG=None

Review-Url: https://codereview.chromium.org/2391893003
Cr-Commit-Position: refs/heads/master@{#423057}
parent 40c818f6
......@@ -91,11 +91,13 @@ class BASE_EXPORT ConditionVariable {
~ConditionVariable();
// Wait() releases the caller's critical section atomically as it starts to
// sleep, and the reacquires it when it is signaled.
// sleep, and the reacquires it when it is signaled. The wait functions are
// susceptible to spurious wakeups. (See usage note 1 for more details.)
void Wait();
void TimedWait(const TimeDelta& max_time);
// Broadcast() revives all waiting threads.
// Broadcast() revives all waiting threads. (See usage note 2 for more
// details.)
void Broadcast();
// Signal() revives one waiting thread.
void Signal();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment