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);

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);

Return Value

A NothrowAwaitable wrapping awaitable.

Parameters

Name

Description

awaitable

The awaitable whose exceptions are propagated cheaply.

Created with MrDocs