aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-07-26 08:15:06 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-07-26 08:15:11 +0200
commitb995a374f7272e45ad8c2c7eee1ceb8a1427086d (patch)
treed386b91031d01a39b15faae90250c5b2f740f22e
parentf29d5dbd04da249604b970d0edd5695cd7049e7f (diff)
parenta56f8b0be3700d608a5634af8c862910f4be2191 (diff)
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
-rw-r--r--src/scheduler.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scheduler.cpp b/src/scheduler.cpp
index 36a6d5110d..1d3fb1f6ea 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<boost::mutex> lock(newTaskMutex);
return nThreadsServicingQueue;
}