chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.73k stars 1.2k forks source link

per-operation cancellation is enabled for composed operations #1333

Closed ashtum closed 11 months ago

ashtum commented 11 months ago

Documentation says:

By default, per-operation cancellation is disabled for composed operations that use experimental::co_composed. It must be explicitly enabled by calling the state's reset_cancellation_state function. https://www.boost.org/doc/libs/1_82_0/doc/html/boost_asio/reference/experimental__co_composed.html

But here, it is explicitly enabled: https://github.com/boostorg/asio/blob/develop/include/boost/asio/experimental/impl/co_composed.hpp#L475

And it works in practice: https://godbolt.org/z/4n9614j4Y