call_once
From cppreference.com
| Defined in header <threads.h>
|
||
| (since C11) | ||
Calls function func exactly once, even if invoked from several threads.
The completion of the function func synchronizes with all previous or subsequent calls to call_once with the same flag variable.
[edit] Parameters
| flag | - | pointer to an object that is used to ensure func is called only once
|
| func | - | the function to execute |
[edit] Return value
(none)