fix a race-condition in JobSystem
mThreadMap needs to be protected as it's accessed from multiple threads.
This commit is contained in:
committed by
Mathias Agopian
parent
2ad932f345
commit
fb0e89d969
@@ -403,6 +403,7 @@ private:
|
||||
uint8_t mParallelSplitCount = 0; // # of split allowable in parallel_for
|
||||
Job* mMasterJob = nullptr;
|
||||
|
||||
utils::SpinLock mThreadMapLock; // this should have very little contention
|
||||
tsl::robin_map<std::thread::id, ThreadState *> mThreadMap;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user