@@ -111,6 +111,7 @@ namespace exec {
111111 struct __parallel_scheduler_env {
112112 // / Returns the system scheduler as the completion scheduler for `set_value_t`.
113113 template <stdexec::__one_of<stdexec::set_value_t > _Tag>
114+ [[nodiscard]]
114115 auto query (stdexec::get_completion_scheduler_t <_Tag>) const noexcept {
115116 return __detail::__make_parallel_scheduler_from (_Tag (), __scheduler_);
116117 }
@@ -222,7 +223,7 @@ namespace exec {
222223
223224 // / Implementation detail. Constructs the sender to wrap `__impl`.
224225 explicit __parallel_sender (__detail::__backend_ptr __impl)
225- : __scheduler_{__impl} {
226+ : __scheduler_{std::move ( __impl) } {
226227 }
227228
228229 // / Gets the environment of this sender.
@@ -232,8 +233,9 @@ namespace exec {
232233 }
233234
234235 // / Value completion happens on the parallel scheduler.
235- parallel_scheduler
236- query (stdexec::get_completion_scheduler_t <stdexec::set_value_t >) const noexcept ;
236+ [[nodiscard]]
237+ auto query (stdexec::get_completion_scheduler_t <stdexec::set_value_t >) const noexcept
238+ -> parallel_scheduler;
237239
238240 // / Connects `__self` to `__rcvr`, returning the operation state containing the work to be done.
239241 template <stdexec::receiver _Rcvr>
@@ -450,6 +452,7 @@ namespace exec {
450452 }
451453
452454 // / Gets the environment of this receiver; returns the environment of the connected receiver.
455+ [[nodiscard]]
453456 auto get_env () const noexcept -> decltype(auto ) {
454457 return stdexec::get_env (__state_.__rcvr_ );
455458 }
@@ -593,8 +596,14 @@ namespace exec {
593596 return parallel_scheduler{std::move (__impl)};
594597 }
595598
596- inline parallel_scheduler __parallel_sender::query (
597- stdexec::get_completion_scheduler_t <stdexec::set_value_t >) const noexcept {
599+ [[deprecated(" get_system_scheduler has been renamed get_parallel_scheduler" )]]
600+ inline auto get_system_scheduler () -> parallel_scheduler {
601+ return get_parallel_scheduler ();
602+ }
603+
604+ inline auto __parallel_sender::query (
605+ stdexec::get_completion_scheduler_t <stdexec::set_value_t >) const noexcept
606+ -> parallel_scheduler {
598607 return __detail::__make_parallel_scheduler_from (stdexec::set_value_t {}, __scheduler_);
599608 }
600609
0 commit comments