Execute the function specified as a parameter once.
Declared in <llvm/Support/Threading.h>
template<
typename Function,
typename... Args>
void
call_once(
once_flag& flag,
Function&& F,
Args&&... ArgList);
Typical usage:
void foo() {...};
...
static once_flag flag;
call_once(flag, foo);
| Name | Description |
|---|---|
| flag | Flag used for tracking whether or not this has run. |
| F | Function to call once. |
| ArgList | Arguments forwarded to F. |