Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/beman/execution/detail/counting_scope_join.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ struct counting_scope_join_t {

template <typename Sender, typename...>
static consteval auto get_completion_signatures() noexcept {
return ::beman::execution::completion_signatures<::beman::execution::set_value_t()>{};
return ::beman::execution::completion_signatures<::beman::execution::set_value_t(),
::beman::execution::set_stopped_t()>{};
}
struct impls_for : ::beman::execution::detail::default_impls {
struct get_state_impl {
Expand Down
1 change: 1 addition & 0 deletions tests/beman/execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ list(
issue-144.test
issue-174.test
issue-186.test
issue-313.test
meta-combine.test
meta-contains.test
meta-filter.test
Expand Down
23 changes: 23 additions & 0 deletions tests/beman/execution/issue-313.test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// tests/beman/execution/issue-313.test.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <test/execution.hpp>
#ifdef BEMAN_HAS_IMPORT_STD
import std;
#else
#include <coroutine>
#endif
#ifdef BEMAN_HAS_MODULES
import beman.execution;
#else
#include <beman/execution.hpp>
#endif

namespace ex = beman::execution;

ex::task<void> func() {
ex::simple_counting_scope scope;
co_await scope.join();
}

int main() { ex::sync_wait(func()); }
2 changes: 1 addition & 1 deletion tests/beman/execution/thread-stoptoken-intro.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct test_source : immovable {
::std::unique_lock guard(this->d_lock);
this->d_cond.wait(
guard, [this] { return this->d_in_progress == false || this->d_id == ::std::this_thread::get_id(); });
::std::exchange(this->d_callback, &this->d_no_call);
(void)::std::exchange(this->d_callback, &this->d_no_call);
}
};
} // namespace
Expand Down