folly::getGlobalCPUExecutor

methodset Executors

Synopsis

Declared in <folly/executors/GlobalExecutor.h>

folly::Executor::KeepAlive<>
getGlobalCPUExecutor();

Description

Retrieve the global immutable executor. This executor is a CPU thread pool of appropriate machine core size.

Use to run CPU workloads.

Return Value

KeepAlive wrapped global immutable CPU executor. May throw on shutdown. If no throw, returned KeepAlive is valid.