Skip to content

Commit 4b3f2f2

Browse files
committed
fixed the result computation using the stop token
1 parent dcc595d commit 4b3f2f2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

include/beman/execution/detail/when_all.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ struct when_all_t {
166166
using value_types =
167167
typename ::beman::execution::detail::when_all_value_types<::beman::execution::detail::meta::combine<
168168
::beman::execution::
169-
value_types_of_t<Sender, Env, ::beman::execution::detail::type_list, ::std::type_identity_t>...>>::
169+
value_types_of_t<Sender, when_all_env<Env>, ::beman::execution::detail::type_list, ::std::type_identity_t>...>>::
170170
type;
171171
using error_types = ::beman::execution::detail::meta::unique<::beman::execution::detail::meta::combine<
172-
::beman::execution::error_types_of_t<Sender, Env, error_comps>...>>;
172+
::beman::execution::error_types_of_t<Sender, when_all_env<Env>, error_comps>...>>;
173173
using stopped_types =
174-
::std::conditional_t<(false || ... || ::beman::execution::sends_stopped<Sender, Env>),
174+
::std::conditional_t<(false || ... || ::beman::execution::sends_stopped<Sender, when_all_env<Env>>),
175175
::beman::execution::completion_signatures<::beman::execution::set_stopped_t()>,
176176
::beman::execution::completion_signatures<>>;
177177
using type = ::beman::execution::detail::meta::combine<value_types, error_types, stopped_types>;

tests/beman/execution/exec-read-env.test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <test/execution.hpp>
66
#ifdef BEMAN_HAS_MODULES
77
import beman.execution;
8+
import beman.execution.detail.join_env;
89
#else
910
#include <beman/execution/detail/read_env.hpp>
1011
#include <beman/execution/detail/common.hpp>
@@ -94,6 +95,7 @@ auto test_read_env_completions() -> void {
9495
test::use(r);
9596

9697
test_std::sync_wait(test_std::read_env(test_std::get_stop_token));
98+
test_std::sync_wait(test_std::when_all(test_std::read_env(test_std::get_stop_token)));
9799
test_std::sync_wait(test_std::when_all(test_std::read_env(test_std::get_scheduler)));
98100
}
99101
} // namespace

0 commit comments

Comments
 (0)