std::once_flag

From Cppreference

Jump to: navigation, search
Defined in header <mutex>

class once_flag;
(C++11 feature)

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.

[edit] Member functions

(constructor)
constructs the object
(public member function)

[edit] See also

call_once (C++11)
invokes a function only once even if called from multiple threads
(function template)