From 7d041bb9ee01ff1e61340f823eb9edd77780d2bc Mon Sep 17 00:00:00 2001 From: Simson Garfinkel Date: Thu, 22 Jul 2021 17:27:33 -0400 Subject: [PATCH] added initializers --- thread_pool.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thread_pool.hpp b/thread_pool.hpp index 44381f3..a83dbf5 100644 --- a/thread_pool.hpp +++ b/thread_pool.hpp @@ -362,7 +362,7 @@ class thread_pool /** * @brief A mutex to synchronize access to the task queue by different threads. */ - mutable std::mutex queue_mutex; + mutable std::mutex queue_mutex {}; /** * @brief An atomic variable indicating to the workers to keep running. When set to false, the workers permanently stop working. @@ -372,7 +372,7 @@ class thread_pool /** * @brief A queue of tasks to be executed by the threads. */ - std::queue> tasks; + std::queue> tasks {}; /** * @brief The number of threads in the pool. @@ -439,7 +439,7 @@ class synced_stream /** * @brief A mutex to synchronize printing. */ - mutable std::mutex stream_mutex; + mutable std::mutex stream_mutex {}; /** * @brief The output stream to print to.