Provide a single‐use thread synchronization mechanism on an event count.
Synopsis
Declared in <bslmt_latch.h>
class Latch;
Description
This class defines a thread synchronization mechanism that allows one or more threads to wait until a certain number of operations have been performed by other threads.
Enums
Name |
Description |
Status codes for timed wait operations. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this latch. The behavior is undefined if any threads are waiting on this latch. |
Decrement the event count by 1 and release waiters if it reaches 0. |
|
Decrement the event count by 1, then wait until the latch is released. |
|
Return the clock type used for timeouts. |
|
Decrement the event count by |
|
Return the current number of events for which this latch is waiting. |
|
Block until this latch is released or |
|
Return whether this latch has already been released. |
|
Block until the number of events this latch waits for reaches 0. |
Created with MrDocs