Schedule an async‐annotated functor to run on a fiber manager. Returns a Future for the result.

Synopsis

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

template<typename F>
Future<lift_unit_t<async_invocable_inner_type_t<F>>>
addFiberFuture(
    F&& func,
    FiberManager& fm);

Description

In most cases, prefer those options instead:

  • executeOnNewFiber: reset fiber stack usage from fiber context

  • executeOnFiberAndWait: initialize fiber context from main context then block thread

Return Value

A Future for the functor's result

Parameters

Name

Description

func

Async‐annotated functor to schedule

fm

Fiber manager to run the functor on

Created with MrDocs