File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
include/beman/execution/detail Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ struct task {
1111 using completion_signatures = ex::completion_signatures<ex::set_value_t ()>;
1212
1313 struct base {
14- virtual void complete_value () noexcept = 0;
14+ virtual void complete_value () noexcept = 0;
1515 virtual void complete_stopped () noexcept = 0;
1616 };
1717
@@ -20,17 +20,16 @@ struct task {
2020 base* data;
2121 bool await_ready () noexcept { return false ; }
2222 auto await_suspend (auto h) noexcept { this ->data ->complete_value (); };
23- void await_resume () noexcept {}
23+ void await_resume () noexcept {}
2424 };
2525 std::suspend_always initial_suspend () const noexcept { return {}; }
2626 final_awaiter final_suspend () const noexcept { return {this ->data }; }
2727 void unhandled_exception () const noexcept {}
2828 std::coroutine_handle<> unhandled_stopped () {
29-
3029 this ->data ->complete_stopped ();
3130 return std::noop_coroutine ();
3231 }
33- auto return_void () {}
32+ auto return_void () {}
3433 auto get_return_object () { return task{std::coroutine_handle<promise_type>::from_promise (*this )}; }
3534 template <::beman::execution::sender Sender>
3635 auto await_transform (Sender&& sender) noexcept {
Original file line number Diff line number Diff line change @@ -87,16 +87,15 @@ class sender_awaitable {
8787 sender_awaitable::awaitable_receiver{::std::addressof (result)})} {}
8888
8989 static constexpr bool await_ready () noexcept { return false ; }
90- ::std::coroutine_handle<> await_suspend (::std::coroutine_handle<Promise> handle ) noexcept {
90+ bool await_suspend (::std::coroutine_handle<Promise>) 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 static_cast <::std::coroutine_handle<>>(
95- ::std::get<2 >(this ->result ).promise ().unhandled_stopped ());
94+ return bool (::std::get<2 >(this ->result ).promise ().unhandled_stopped ());
9695 }
97- return handle ;
96+ return false ;
9897 }
99- return :: std::noop_coroutine () ;
98+ return true ;
10099 }
101100 value_type await_resume () {
102101 if (::std::holds_alternative<::std::exception_ptr>(::std::get<0 >(result))) {
You can’t perform that action at this time.
0 commit comments