aboutsummaryrefslogtreecommitdiff
path: root/src/scheduler.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-07-23 14:51:22 -0400
committerMatt Corallo <git@bluematt.me>2017-07-23 14:51:22 -0400
commita56f8b0be3700d608a5634af8c862910f4be2191 (patch)
treeaa5deffbc73276e53750be0116baf2d76e02cc79 /src/scheduler.cpp
parent0c173a15ca1bf20999f74987988985508c9de463 (diff)
downloadbitcoin-a56f8b0be3700d608a5634af8c862910f4be2191.tar.xz
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.
Diffstat (limited to 'src/scheduler.cpp')
-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;
}