Add coro::toSemiFuture
Summary: Currently the best way to get an eager SemiFuture from an AsyncGenerator is folly::coro::co_invoke( [&]() -> folly::coro::Task<folly::coro::AsyncGenerator<T&&>::NextResult> { co_return co_await gen.next(); }) .scheduleOn(&ex) .start(); which is very verbose. This diff adds helpers to make this a simple function call. Reviewed By: andriigrynenko Differential Revision: D19835473 fbshipit-source-id: f6e7e72cad0e0596df375d2662c87d4412536c03
Showing
Please register or sign in to comment