Add lock guard to getNumberOfWorkers()

This commit is contained in:
Simon
2016-09-08 21:46:15 -07:00
parent e91048f28d
commit a50fd5fdb7
+1
View File
@@ -183,6 +183,7 @@ void AsyncRPCQueue::addWorker() {
* Return the number of worker threads spawned by the queue
*/
size_t AsyncRPCQueue::getNumberOfWorkers() const {
std::lock_guard<std::mutex> guard(lock_);
return workers_.size();
}