BloombergLP::bslmt::Sluice

This class controls the release of threads from a common synchronization point.

Synopsis

Declared in <bslmt_sluice.h>

class Sluice;

Description

One or more threads may "enter" a Sluice object, and then wait to be released. Either one waiting thread (via the signalOne method), or all waiting threads (via the signalAll method), may be signaled for release. In any case, Sluice provides a guarantee against starvation.

Enums

NameDescription
Unnamed enum Status codes for timed wait operations.

Member Functions

NameDescription
Sluice [constructor]Constructors
~Sluice [destructor]Destroy this sluice.
clockType Return the clock type used for timeouts.
enter Enter this sluice and return a token on which to wait.
signalAll Signal all threads that have entered this sluice and have not yet been released.
signalOne Signal one thread that has entered this sluice and has not yet been released.
timedWait Wait for token to be signaled, or until absTime expires.
wait Wait for the specified token to be signaled and release it.