mozilla::CondVar
is a bare wrapper around PRCondVar
. Please see Introduction_to_NSPR for a high-level summary of its semantics.
#include "CondVar.h"
CondVar(Mutex& aMutex, const char* aName)
Initialize the CondVar with its associated mutex and a name to reference it by.
nsresult Wait( in PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT );
Wait on this CondVar
until it is Notify
ed.
nsresult Notify(void);
Notify one thread waiting on this CondVar
.
nsresult NotifyAll(void);
Notify all threads waiting on this CondVar
.
Assert that the current thread has successfully Lock
ed the mutex undergirding this CondVar
. Does not incur a runtime penalty in optimized builds.
Assert that the current thread has not successfully Lock
ed the mutex undergirding this CondVar
. Does not incur a runtime penalty in optimized builds.