Schedule an async-annotated functor to run on a fiber manager. Returns a Future for the result.
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);
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
A Future for the functor's result
| Name | Description |
|---|---|
| func | Async-annotated functor to schedule |
| fm | Fiber manager to run the functor on |