Enter the associated Once object's one‐time region if allowed.

Synopsis

Declared in <bslmt_once.h>

bool
enter();

Description

Call enter on the associated Once object and return the result. If Once::enter returns true, set this object into the "in‐progress" state. The behavior is undefined unless this object has been associated with a Once object, either in the constructor or using setOnce, or if this object is already in the "in‐progress" state.

Return Value

true if this thread entered the one‐time region, and false otherwise

Created with MrDocs