Skip to content

Commit 43b3a99

Browse files
eisenwavetkoeppe
authored andcommitted
P3887R1 Make when_all a Ronseal Algorithm
1 parent 44f3ca5 commit 43b3a99

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
@@ -4630,9 +4630,15 @@
46304630
\item
46314631
Otherwise, evaluates:
46324632
\begin{codeblock}
4633-
@\exposid{on_stop}@.reset();
4634-
set_stopped(std::move(rcvr));
4633+
if constexpr (@\placeholder{sends-stopped}@) {
4634+
@\exposid{on_stop}@.reset();
4635+
set_stopped(std::move(rcvr));
4636+
}
46354637
\end{codeblock}
4638+
where \tcode{\placeholder{sends-stopped}} equals \tcode{true}
4639+
if and only if there exists an element \tcode{S} of \tcode{Sndrs} such that
4640+
\tcode{completion_signatures_of_t<S, \exposid{when-all-env}<Env>>}
4641+
contains \tcode{set_stopped_t()}.
46364642
\end{itemize}
46374643

46384644
\pnum
@@ -4645,12 +4651,7 @@
46454651
state.@\exposid{on_stop}@.emplace(
46464652
get_stop_token(get_env(rcvr)),
46474653
@\exposid{on-stop-request}@{state.@\exposid{stop_src}@});
4648-
if (state.@\exposid{stop_src}@.stop_requested()) {
4649-
state.@\exposid{on_stop.}@reset();
4650-
set_stopped(std::move(rcvr));
4651-
} else {
4652-
(start(ops), ...);
4653-
}
4654+
(start(ops), ...);
46544655
}
46554656
\end{codeblock}
46564657

0 commit comments

Comments
 (0)