Skip to content

Commit 33368c6

Browse files
committed
P3887R1 Make when_all a Ronseal Algorithm
1 parent 98ce5ac commit 33368c6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

source/exec.tex

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,9 +4612,15 @@
46124612
\item
46134613
Otherwise, evaluates:
46144614
\begin{codeblock}
4615-
@\exposid{on_stop}@.reset();
4616-
set_stopped(std::move(rcvr));
4615+
if constexpr (@\placeholder{sends-stopped}@) {
4616+
@\exposid{on_stop}@.reset();
4617+
set_stopped(std::move(rcvr));
4618+
}
46174619
\end{codeblock}
4620+
where \tcode{\placeholder{sends-stopped}} equals \tcode{true}
4621+
if and only if there exists an element \tcode{S} of \tcode{Sndrs} such that
4622+
\tcode{completion_signatures_of_t<S, \exposid{when-all-env}<Env>>}
4623+
contains \tcode{set_stopped_t()}.
46184624
\end{itemize}
46194625

46204626
\pnum
@@ -4627,12 +4633,7 @@
46274633
state.@\exposid{on_stop}@.emplace(
46284634
get_stop_token(get_env(rcvr)),
46294635
@\exposid{on-stop-request}@{state.@\exposid{stop_src}@});
4630-
if (state.@\exposid{stop_src}@.stop_requested()) {
4631-
state.@\exposid{on_stop.}@reset();
4632-
set_stopped(std::move(rcvr));
4633-
} else {
4634-
(start(ops), ...);
4635-
}
4636+
(start(ops), ...);
46364637
}
46374638
\end{codeblock}
46384639

0 commit comments

Comments
 (0)