Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added initializers to resolve compiler warnings #17

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions thread_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -372,7 +372,7 @@ class thread_pool
/**
* @brief A queue of tasks to be executed by the threads.
*/
std::queue<std::function<void()>> tasks;
std::queue<std::function<void()>> tasks {};

/**
* @brief The number of threads in the pool.
Expand Down Expand Up @@ -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.
Expand Down