2
0
mirror of https://github.com/boostorg/asio.git synced 2026-02-24 02:12:12 +00:00
Files
asio/test
Christopher Kohlhoff 769dc0e149 Add this_coro::throw_if_cancelled.
By default, awaitable<>-based coroutines now throw an exception if they
have been previously cancelled, and then try to perform a co_await
against another awaitable<>.

To disable this behaviour for the current awaitable<>-based "thread",
perform:

    co_await boost::asio::this_coro::throw_if_error(false);

It is then the responsibility of the coroutine implementation to ensure
that it checks the cancellation state of the coroutine manually, by
doing something like:

    auto cs = boost::asio::this_coro::cancellation_state;
    // ...
    if (cs.cancelled() != cancellation_type::none)
    {
      // ... handle cancellation ...
    }
2021-07-04 13:10:27 +10:00
..
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-07-02 12:29:57 +10:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00
2021-02-25 08:29:05 +11:00