![]() |
Storage Engine API
|
Establishes a synchronization point between threads. More...
#include <commit_notifier.h>
Establishes a synchronization point between threads.
N threads are waits and one is notifier.
Public Types | |
typedef unsigned long long | When |
Public Member Functions | |
CommitNotifier () | |
~CommitNotifier () | |
When | now () |
void | waitFor (When e) |
Awaits the next notifyAll() call by another thread. More... | |
void | awaitBeyondNow () |
A bit faster than waitFor(now()). More... | |
void | notifyAll (When e) |
May be called multiple times. More... | |
unsigned | nWaiting () const |
Returns how many threads are blocked in the waitFor/awaitBeyondNow calls. More... | |
Private Member Functions | |
MONGO_DISALLOW_COPYING (CommitNotifier) | |
Private Attributes | |
stdx::mutex | _mutex |
stdx::condition_variable | _condition |
When | _lastDone {0} |
When | _lastReturned {0} |
unsigned | _nWaiting {0} |
typedef unsigned long long mongo::CommitNotifier::When |
|
default |
mongo::CommitNotifier::~CommitNotifier | ( | ) |
void mongo::CommitNotifier::awaitBeyondNow | ( | ) |
A bit faster than waitFor(now()).
|
private |
CommitNotifier::When mongo::CommitNotifier::now | ( | ) |
|
inline |
Returns how many threads are blocked in the waitFor/awaitBeyondNow calls.
Awaits the next notifyAll() call by another thread.
notifications that precede this call are ignored – we are looking for a fresh event.
|
private |
|
private |
|
private |
|
private |
|
private |