1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00

Added a ScopedLock in ThreadPool::getNumJobs() to fix a potential data race

This commit is contained in:
ed 2019-03-25 16:37:02 +00:00
parent 290aad89f8
commit ba2575a4d3

View file

@ -176,6 +176,7 @@ void ThreadPool::addJob (std::function<void()> jobToRun)
int ThreadPool::getNumJobs() const noexcept
{
const ScopedLock sl (lock);
return jobs.size();
}