Awaits awaitable, giving up after duration elapses.
Declared in <folly/coro/TimedWait.h>
template<typename Awaitable>
Task<Optional<lift_unit_t</* implementation-defined */>>>
timed_wait(
Awaitable awaitable,
Duration duration);
A task with the awaitable's result, or folly::none on timeout.
| Name | Description |
|---|---|
| awaitable | The operation to await. |
| duration | The maximum time to wait before timing out. |