From b5e9e99484b83b4a36c079e8725542c147c31299 Mon Sep 17 00:00:00 2001 From: Paul Tsouchlos Date: Wed, 18 Sep 2024 16:55:39 -0600 Subject: [PATCH] chore: update some comments --- include/thread_pool/thread_pool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/thread_pool/thread_pool.h b/include/thread_pool/thread_pool.h index 95485d5..cce034c 100644 --- a/include/thread_pool/thread_pool.h +++ b/include/thread_pool/thread_pool.h @@ -88,9 +88,9 @@ namespace dp { } while (unassigned_tasks_.load(std::memory_order_acquire) > 0); priority_queue_.rotate_to_front(id); - // check if all tasks are completed and release the barrier (binary - // semaphore) + // check if all tasks are completed and release the "barrier" if (in_flight_tasks_.load(std::memory_order_acquire) == 0) { + // in theory, only one thread will set this threads_complete_signal_.store(true, std::memory_order_release); threads_complete_signal_.notify_one(); }