folly::async

Run a callable asynchronously on the global CPU executor.

Synopsis

Declared in <folly/executors/Async.h>

template<class F>
auto
async(F&& fn);

Return Value

A future for the result produced by the callable.

Template Parameters

NameDescription
FThe callable type.

Parameters

NameDescription
fnThe callable to execute.