30 _stop_callback_ptr =
nullptr;
31 _stop_token = other._stop_token;
35 awaitable_stop_token(std::stop_token
const &stop_token) noexcept : _stop_token(stop_token), _stop_callback_ptr()
39 [[nodiscard]]
bool await_ready()
const noexcept
41 return _stop_token.stop_requested();
44 void await_suspend(std::coroutine_handle<> handle)
noexcept;
46 void await_resume()
noexcept {
47 _stop_callback_ptr =
nullptr;
51 struct callback_wrapper {
52 void operator()()
noexcept;
55 std::coroutine_handle<> handle;
58 std::stop_token _stop_token;