Browse Source

Added missing atomic

Paul-Louis Ageneau 4 years ago
parent
commit
781d864b9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/threadpool.hpp

+ 1 - 1
src/threadpool.hpp

@@ -72,7 +72,7 @@ protected:
 	std::function<void()> dequeue(); // returns null function if joining
 	std::function<void()> dequeue(); // returns null function if joining
 
 
 	std::vector<std::thread> mWorkers;
 	std::vector<std::thread> mWorkers;
-	int mBusyWorkers = 0;
+	std::atomic<int> mBusyWorkers = 0;
 	std::atomic<bool> mJoining = false;
 	std::atomic<bool> mJoining = false;
 
 
 	struct Task {
 	struct Task {