From 3e483659a8c36c3f0c9594bac5e96f00efcaca08 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 26 Jul 2017 08:15:06 +0200 Subject: [PATCH] Merge #10914: Add missing lock in CScheduler::AreThreadsServicingQueue() a56f8b0 Add missing lock in CScheduler::AreThreadsServicingQueue() (Matt Corallo) Pull request description: Not an actual bug as this is only used in asserts right now, but nice to not have a missing lock. Tree-SHA512: 7e542b150a0be716783e196493d239f2ad15e5376abf54b67d735dc3ef1b10849c090337b849f530c9f7497ddcfb8389b47d64a5dcf6382b7d38838f88cc1100 --- src/scheduler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 80a210ca7..29f7cee5e 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; }