diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 36a6d5110d9..1d3fb1f6ea8 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -141,6 +141,7 @@ size_t CScheduler::getQueueInfo(boost::chrono::system_clock::time_point &first, } bool CScheduler::AreThreadsServicingQueue() const { + boost::unique_lock lock(newTaskMutex); return nThreadsServicingQueue; }