Skip to content
Open
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
1 change: 1 addition & 0 deletions include/exec/start_now.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace experimental::execution

constexpr __storage_base(_Env&& __env, std::size_t __pending)
: __pending_(__pending)
, __joiner_(__pending == 0 ? nullptr : &__empty_joiner_)
, __env_(__mkenv(static_cast<_Env&&>(__env), __source_))
{}

Expand Down
8 changes: 8 additions & 0 deletions test/exec/async_scope/test_start_now.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ namespace
REQUIRE(executed);
}

TEST_CASE("start_now zero", "[async_scope][start_now]")
{
async_scope scope;
auto stg = start_now(scope);

REQUIRE(sync_wait(stg.async_wait()).has_value());
}

TEST_CASE("start_now two", "[async_scope][start_now]")
{
bool executedA{false};
Expand Down
Loading