Skip to content

Commit 3bbf3fe

Browse files
test(exec): fork_join with empty value channel
Signed-off-by: romintomasetti <[email protected]>
1 parent 68bcedc commit 3bbf3fe

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

include/exec/fork_join.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace exec {
137137
using _when_all_sndr_t =
138138
fork_join_t::_when_all_sndr_t<_child_completions_t, Closures, _domain_t>;
139139
using _child_opstate_t =
140-
STDEXEC::connect_result_t<Sndr, STDEXEC::__rcvr_ref_t<_opstate_t, _env_t>>;
140+
STDEXEC::connect_result_t<Sndr, STDEXEC::__rcvr_ref_t<_opstate_t>>;
141141
using _fork_opstate_t =
142142
STDEXEC::connect_result_t<_when_all_sndr_t, STDEXEC::__rcvr_ref_t<Rcvr>>;
143143
using _cache_sndr_t = fork_join_t::_cache_sndr_t<_variant_t<_child_completions_t>, _domain_t>;

test/exec/test_fork.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,13 @@ namespace {
7272
CHECK(i1 == 42);
7373
CHECK(i2 == 42);
7474
}
75+
76+
TEST_CASE("fork_join with empty value channel", "[adaptors][fork_join]") {
77+
auto sndr = ::STDEXEC::just() | ::STDEXEC::then([]() noexcept -> void { })
78+
| exec::fork_join(
79+
::STDEXEC::then([]() noexcept -> void { }),
80+
::STDEXEC::then([]() noexcept -> void { }));
81+
82+
::STDEXEC::sync_wait(std::move(sndr));
83+
}
7584
} // namespace

0 commit comments

Comments
 (0)