MongoDB  2.7.0
Public Types | Public Member Functions | List of all members
mongo::NotifyAll Class Reference

establishes a synchronization point between threads. More...

#include <synchronization.h>

Inheritance diagram for mongo::NotifyAll:

Public Types

typedef unsigned long long When
 

Public Member Functions

When now ()
 
void waitFor (When)
 awaits the next notifyAll() call by another thread. More...
 
void awaitBeyondNow ()
 a bit faster than waitFor( now() )
 
void notifyAll (When)
 may be called multiple times. More...
 
unsigned nWaiting () const
 indicates how many threads are waiting for a notify. More...
 

Detailed Description

establishes a synchronization point between threads.

N threads are waits and one is notifier. threadsafe.

Member Function Documentation

void mongo::NotifyAll::notifyAll ( When  e)

may be called multiple times.

notifies all waiters

unsigned mongo::NotifyAll::nWaiting ( ) const
inline

indicates how many threads are waiting for a notify.

void mongo::NotifyAll::waitFor ( When  e)

awaits the next notifyAll() call by another thread.

notifications that precede this call are ignored – we are looking for a fresh event.


The documentation for this class was generated from the following files: