소스 검색

Added missing atomic

Paul-Louis Ageneau 4 년 전
부모
커밋
781d864b9f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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::vector<std::thread> mWorkers;
-	int mBusyWorkers = 0;
+	std::atomic<int> mBusyWorkers = 0;
 	std::atomic<bool> mJoining = false;
 
 	struct Task {