std::once_flag
| Defined in header <mutex>
|
||
| class once_flag; |
(since C++11) | |
The class std::once_flag is a helper structure for std::call_once.
An object of type std::once_flag that is passed to multiple calls to std::call_once allows those calls to coordinate with each other such that only one of the calls will actually run to completion.
std::once_flag is neither copyable nor movable.
Contents |
[edit] Member functions
std::once_flag::once_flag
| constexpr once_flag() noexcept; |
||
Constructs an once_flag object. The internal state is set to indicate that no function has been called yet.
Parameters
(none)
[edit] See also
| (C++11) |
invokes a function only once even if called from multiple threads (function template) |
| C documentation for once_flag
| |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
