folly::fibers::async::runInMainContextWithTracing

Connects the execution of synchronous function F (on the main thread context) to the calling fiber

Synopsis

Declared in <folly/fibers/async/AsyncStack.h>

template<typename F>
std::invoke_result_t<F>
runInMainContextWithTracing(F&& func);

Description

Note: The calling fiber must have a valid async-stack-root for meaningful stacks.

Return Value

The result of invoking func.

Parameters

NameDescription
funcSynchronous function to run on the main thread context.