call_once overloads

Synopses

Declared in <folly/synchronization/CallOnce.h>

Grants the free call_once access to the flag internals.

void
call_once(
    OnceFlag&,
    F&&,
    Args&&...);

[» more...]

Drop‐in replacement for std::call_once.

template<
    typename OnceFlag,
    typename F,
    typename... Args>
void
call_once(
    OnceFlag& flag,
    F&& f,
    Args&&... args);

Parameters

Name

Description

flag

The once‐flag guarding the call.

f

The callable to invoke at most once.

args

The arguments to forward to the callable.

Created with MrDocs