folly::coro::co_nothrow

Cheaply propagate exceptions from awaitable to the calling coroutine, bypassing the expensive throw/catch stack unwinding mechanism.

Synopses

Declared in <folly/coro/Nothrow.h>

Cheaply propagate exceptions from awaitable to the calling coroutine, bypassing the expensive throw/catch stack unwinding mechanism.

template<typename Awaitable>
requires !value_only_awaitable_v<Awaitable> && // Comment on `NothrowAwaitable`
            folly::ext::must_use_immediately_v<Awaitable>
/* implementation-defined */
co_nothrow(Awaitable awaitable);
» more...

Cheaply propagate exceptions from awaitable to the calling coroutine, bypassing the expensive throw/catch stack unwinding mechanism.

template<typename Awaitable>
requires !value_only_awaitable_v<Awaitable> && // Comment on `NothrowAwaitable`
            !folly::ext::must_use_immediately_v<Awaitable>
/* implementation-defined */
co_nothrow(Awaitable&& awaitable);
» more...

Return Value

A NothrowAwaitable wrapping awaitable.

Parameters

NameDescription
awaitableThe awaitable whose exceptions are propagated cheaply.