aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2017-07-23 14:51:22 -0400
committerMatt Corallo <[email protected]>2017-07-23 14:51:22 -0400
commita56f8b0be3700d608a5634af8c862910f4be2191 (patch)
treeaa5deffbc73276e53750be0116baf2d76e02cc79
parentMerge #10893: [QA] Avoid running multiwallet.py twice (diff)
downloaddiscoin-a56f8b0be3700d608a5634af8c862910f4be2191.tar.xz
discoin-a56f8b0be3700d608a5634af8c862910f4be2191.zip
Add missing lock in CScheduler::AreThreadsServicingQueue()
Not an actual bug as this is only used in asserts right now, but nice to not have a missing lock.
-rw-r--r--src/scheduler.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scheduler.cpp b/src/scheduler.cpp
index 36a6d5110..1d3fb1f6e 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;
}