Skip to content

Commit

Permalink
chore: use store with atomic bool
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperPaul123 committed Jul 4, 2024
1 parent c3ebe0a commit ac68c04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/thread_pool/thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace dp {
// check if all tasks are completed and release the barrier (binary
// semaphore)
if (in_flight_tasks_.load(std::memory_order_acquire) == 0) {
threads_complete_signal_ = true;
threads_complete_signal_.store(true, std::memory_order_release);
threads_complete_signal_.notify_one();
}

Expand Down

0 comments on commit ac68c04

Please sign in to comment.