Add support for folly::coro::Task<T&>
Summary: Extended `folly::coro::Task` to support an lvalue-reference value type. A `Task<T&>` stores the value internally in a `folly::Try<std::reference_wrapper<T>>` as `folly::Try` does not support reference value types. This means that when you use `co_await task.co_awaitTry()` on a `Task<T&>` that you get back a `folly::Try<std::reference_wrapper<T>>` instead of a `folly::Try<T&>`. Also added support for using `.co_awaitTry()` on `Task<T>`. Previously the `.co_awaitTry()` method was only supported on the `TaskWithExecutor<T>` type. Reviewed By: andriigrynenko Differential Revision: D14657997 fbshipit-source-id: a168991b5a9c278dcc2387a6ff4fba9e47ccac0d
Showing
Please register or sign in to comment