Gate‐keeper class for code that should only execute once per process.
Synopsis
Declared in <bslmt_once.h>
class Once;
Description
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.
Type Aliases
Name |
Description |
Special token created by a single thread to pass to the |
Member Functions
Name |
Description |
Call |
|
Abort incomplete one‐time execution and unlock the internal mutex. |
|
Attempt to enter the one‐time execution region for this object. |
|
Return |
|
Mark one‐time execution as complete and unlock the internal mutex. |
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