File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121#include " __receivers.hpp"
2222#include " __senders.hpp"
2323#include " __schedulers.hpp"
24- #include " __submit.hpp"
24+ #include " __start_detached.hpp"
25+ #include " __then.hpp"
2526#include " __transform_sender.hpp"
2627
27- #include < exception>
28-
2928namespace stdexec {
3029 // ///////////////////////////////////////////////////////////////////////////
3130 // [execution.execute]
3231 namespace __execute_ {
33- template <class _Fun >
34- struct __as_receiver {
35- using receiver_concept = receiver_t ;
36- _Fun __fun_;
37-
38- void set_value () noexcept {
39- // terminates on exception:
40- __fun_ ();
41- }
42-
43- [[noreturn]]
44- void set_error (std::exception_ptr) noexcept {
45- std::terminate ();
46- }
47-
48- void set_stopped () noexcept {
49- }
50- };
51-
5232 struct execute_t {
5333 template <scheduler _Scheduler, class _Fun >
5434 requires __callable<_Fun&> && move_constructible<_Fun>
@@ -61,7 +41,7 @@ namespace stdexec {
6141 template <sender_of<set_value_t ()> _Sender, class _Fun >
6242 requires __callable<_Fun&> && move_constructible<_Fun>
6343 void apply_sender (_Sender&& __sndr, _Fun __fun) const noexcept (false ) {
64- __submit ( static_cast <_Sender&&>(__sndr), __as_receiver<_Fun>{ static_cast <_Fun&&>(__fun)} );
44+ start_detached ( then ( static_cast <_Sender&&>(__sndr), static_cast <_Fun&&>(__fun)) );
6545 }
6646 };
6747 } // namespace __execute_
You can’t perform that action at this time.
0 commit comments