2727#include " __schedulers.hpp"
2828#include " __sender_adaptor_closure.hpp"
2929#include " __senders.hpp"
30+ #include " __submit.hpp"
3031#include " __transform_sender.hpp"
3132#include " __transform_completion_signatures.hpp"
3233#include " __variant.hpp"
@@ -224,9 +225,10 @@ namespace stdexec {
224225 __result_receiver_t <_Receiver, _Scheduler>>;
225226
226227 template <class _ResultSender , class _Scheduler , class _Receiver >
227- using __op_state_t = connect_result_t <
228+ using __submit_result = submit_result_t <
228229 _ResultSender,
229- __checked_result_receiver_t <_ResultSender, _Scheduler, _Receiver>>;
230+ __checked_result_receiver_t <_ResultSender, _Scheduler, _Receiver>,
231+ __ignore>;
230232
231233 template <class _SetTag , class _Fun , class _Sched , class ... _Env>
232234 struct __transform_signal_fn {
@@ -353,10 +355,11 @@ namespace stdexec {
353355 // ! Metafunction creating the operation state needed to connect the result of calling
354356 // ! the sender factory function, `_Fun`, and passing its result to a receiver.
355357 template <class _Receiver , class _Fun , class _Set , class _Sched >
356- struct __op_state_for {
357- static_assert (!std::is_reference_v<_Sched>);
358+ struct __submit_datum_for {
359+ // compute the result of calling submit with the result of executing _Fun
360+ // with _Args. if the result is void, substitute with __ignore.
358361 template <class ... _Args>
359- using __f = __op_state_t <
362+ using __f = __submit_result <
360363 __mcall<__result_sender_fn<_Set, _Fun, _Sched, env_of_t <_Receiver>>, _Args...>,
361364 _Sched,
362365 _Receiver>;
@@ -371,10 +374,10 @@ namespace stdexec {
371374 using __env_t = __result_env_t <_Sched, env_of_t <_Receiver>>;
372375 using __rcvr_t = __receiver_with_sched_t <_Receiver, _Sched>;
373376 using __result_variant = __variant_for<__monostate, _Tuples...>;
374- using __op_state_variant = //
377+ using __submit_variant = //
375378 __variant_for<
376379 __monostate,
377- __mapply<__op_state_for <_Receiver, _Fun, _Set, _Sched>, _Tuples>...>;
380+ __mapply<__submit_datum_for <_Receiver, _Fun, _Set, _Sched>, _Tuples>...>;
378381
379382 template <class _ResultSender , class _OpState >
380383 auto __get_result_receiver (const _ResultSender&, _OpState& __op_state) -> decltype(auto ) {
@@ -407,7 +410,7 @@ namespace stdexec {
407410 __result_variant __args_{};
408411 // ! Variant type for holding the operation state from connecting
409412 // ! the function result to the downstream receiver:
410- __op_state_variant __op_state3_ {};
413+ __submit_variant __storage_ {};
411414 };
412415
413416 // ! Implementation of the `let_*_t` types, where `_Set` is, e.g., `set_value_t` for `let_value`.
@@ -493,8 +496,8 @@ namespace stdexec {
493496 };
494497
495498 // ! Helper function to actually invoke the function to produce `let_*`'s sender,
496- // ! connect it to the downstream receiver, and start it.
497- // ! This is the heart of `let_*`.
499+ // ! connect it to the downstream receiver, and start it. This is the heart of
500+ // ! `let_*`.
498501 template <class _State , class _OpState , class ... _As>
499502 static void __bind_ (_State& __state, _OpState& __op_state, _As&&... __as) {
500503 // Store the passed-in (received) args:
@@ -504,9 +507,8 @@ namespace stdexec {
504507 // Create a receiver based on the state, the computed sender, and the operation state:
505508 auto __rcvr2 = __state.__get_result_receiver (__sndr2, __op_state);
506509 // Connect the sender to the receiver and start it:
507- auto & __op2 = __state.__op_state3_ .emplace_from (
508- stdexec::connect, std::move (__sndr2), std::move (__rcvr2));
509- stdexec::start (__op2);
510+ __state.__storage_ .emplace_from (
511+ stdexec::submit, std::move (__sndr2), std::move (__rcvr2), __ignore{});
510512 }
511513
512514 template <class _OpState , class ... _As>
0 commit comments