We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bba1f7c commit 3fb1369Copy full SHA for 3fb1369
include/cpr/threadpool.h
@@ -183,11 +183,11 @@ class ThreadPool {
183
template <class Fn, class... Args>
184
auto Submit(Fn&& fn, Args&&... args) {
185
{
186
- const std::unique_lock lock(controlMutex);
+ const std::unique_lock lockControl(controlMutex);
187
// Add a new worker thread in case the tasks queue is not empty and we still can add a thread
188
bool shouldAddThread{false};
189
190
- std::unique_lock lock(taskQueueMutex);
+ std::unique_lock lockQueue(taskQueueMutex);
191
if (idleThreadCount <= tasks.size() && curThreadCount < maxThreadCount) {
192
if (state == State::RUNNING) {
193
shouldAddThread = true;
0 commit comments