Add lock guard to getNumberOfWorkers()
This commit is contained in:
parent
e91048f28d
commit
a50fd5fdb7
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue