std::once_flag
From cppreference.com
Defined in header <mutex>
|
||
class once_flag; |
(since C++11) | |
The class std::once_flag is a helper structure passed to std::call_once to group invocations of that function so that only one invocation results in execution of one of the functions passed to std::call_once.
Noncopyable.
Contents |
[edit] Member functions
std::once_flag::once_flag
once_flag(); |
||
Constructs an once_flag object. The internal state is set to indicate that no function has been called yet.
Parameters
(none)
Exceptions
[edit] See also
(C++11) |
invokes a function only once even if called from multiple threads (function template) |