Skip to content
Open
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
4 changes: 4 additions & 0 deletions asio/include/asio/experimental/impl/parallel_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ void ranged_parallel_group_launch(Condition cancellation_condition,
state, std::move(ex), idx++));
}

// Since all operations have already been completed, cancellation will not be performed.
if (state->outstanding_ == 0)
return;

// Check if any of the operations has already requested cancellation, and if
// so, emit a signal for each operation in the group.
if ((state->cancellations_requested_ -= range_size) > 0)
Expand Down