Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Update core/utils/wait_group.hpp
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Lobov <andrei.lobov@arangodb.com>
  • Loading branch information
MBkkt and Dronplane authored Nov 3, 2023
1 parent be28959 commit a594b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/utils/wait_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct WaitGroup {
}

void Done(size_t counter = 1) noexcept {
if (counter_.fetch_sub(counter, std::memory_order_acq_rel) == 1) {
if (counter_.fetch_sub(counter, std::memory_order_acq_rel) == counter) {
std::lock_guard lock{m_};
cv_.notify_one();
}
Expand Down

0 comments on commit a594b95

Please sign in to comment.