Skip to content

Commit b3ceed2

Browse files
authored
change sender_awaitable::await_suspend to use coro handles (#192)
* change sender_awaitable::await_suspend to use coro handles * clang-format
1 parent 686685c commit b3ceed2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/beman/execution/detail/sender_awaitable.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ class sender_awaitable {
8686
state{::beman::execution::connect(::std::forward<Sndr>(sndr),
8787
sender_awaitable::awaitable_receiver{::std::addressof(result)})} {}
8888

89-
static constexpr bool await_ready() noexcept { return false; }
90-
bool await_suspend(::std::coroutine_handle<Promise>) noexcept {
89+
static constexpr bool await_ready() noexcept { return false; }
90+
::std::coroutine_handle<> await_suspend(::std::coroutine_handle<Promise> handle) noexcept {
9191
::beman::execution::start(state);
9292
if (::std::get<1>(this->result).exchange(true, std::memory_order_acq_rel)) {
9393
if (::std::holds_alternative<::std::monostate>(::std::get<0>(this->result))) {
94-
return bool(::std::get<2>(this->result).promise().unhandled_stopped());
94+
return ::std::get<2>(this->result).promise().unhandled_stopped();
9595
}
96-
return false;
96+
return ::std::move(handle);
9797
}
98-
return true;
98+
return ::std::noop_coroutine();
9999
}
100100
value_type await_resume() {
101101
if (::std::holds_alternative<::std::exception_ptr>(::std::get<0>(result))) {

0 commit comments

Comments
 (0)