Gate‐keeper class for code that should only execute once per process. This class is a POD‐type and can be statically initialized to the value of the BSLMT_ONCE_INITIALIZE macro. For this reason, it does not have any explicitly‐declared constructors or destructor.
Synopsis
Declared in <bslmt_once.h>
class Once;
Type Aliases
Name |
Description |
Special token created by a single thread to pass to the |
Member Functions
Name |
Description |
If no other thread has yet called |
|
Revert this object to the state it was in before |
|
Lock the internal mutex using the specified |
|
Return |
|
Set this object into a state such that pending and future calls to |
Data Members
Name |
Description |
Mutex used to synchronize one‐time execution. Public for static initialization, but do not access directly. |
|
One‐time execution state. Public for static initialization, but do not access directly. |
Created with MrDocs