folly::concurrent_lazy

Creates a ConcurrentLazy with a type deduced from the callable.

Synopsis

Declared in <folly/ConcurrentLazy.h>

template<class Func>
ConcurrentLazy<remove_cvref_t<Func>>
concurrent_lazy(Func&& func);

Return Value

A ConcurrentLazy that computes and caches the result of func.

Parameters

NameDescription
funcThe callable used to compute the value on first access.