Commit 77a38ddb authored by Matthieu Martin's avatar Matthieu Martin Committed by Facebook GitHub Bot

Add addFiberRemote

Summary: Complete support of the FiberManager::addTask*

Reviewed By: pranavtbhat

Differential Revision: D22305146

fbshipit-source-id: 94e4a02f754b306d8b5fe4994832a7e2dc2cf4a5
parent 6284a28e
......@@ -47,6 +47,16 @@ void addFiber(F&& func, FiberManager& fm) {
[func = std::forward<F>(func)]() mutable { return init_await(func()); });
}
/**
* Schedule an async-annotated functor to run on a remote thread's
* fiber manager.
*/
template <typename F>
void addFiberRemote(F&& func, FiberManager& fm) {
fm.addTaskRemote(
[func = std::forward<F>(func)]() mutable { return init_await(func()); });
}
/**
* Schedule an async-annotated functor to run on a fiber manager.
* Returns a Future for the result.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment