Skip to content

Commit

Permalink
co/MultiResume: add assertion verifying that all waiters have been re…
Browse files Browse the repository at this point in the history
…sumed
  • Loading branch information
MaxKellermann committed Dec 5, 2024
1 parent 29655ee commit 4ab62c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/co/MultiResume.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace Co {
* never "ready", it always suspends waiters. All waiters can be
* resumed with one method call.
*
* This object must remain valid until all waiters have been resumed.
* This object must remain valid until all waiters have been resumed
* (or canceled).
*
* This is similar to #MultiAwaitable, but there is no internal task.
*/
Expand Down Expand Up @@ -77,6 +78,10 @@ public:
[[nodiscard]]
MultiResume() noexcept = default;

~MultiResume() noexcept {
assert(requests.empty());
}

/**
* Creates a new awaitable
*/
Expand Down

0 comments on commit 4ab62c0

Please sign in to comment.