diff options
author | khlebnikov <khlebnikov@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
commit | df35d89845ad252e6db1c6adf84da9b15de0e3b3 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/thread/pool.cpp | |
parent | 6cffcf9a14a1dd07278bd534c7cca706ec2827b3 (diff) | |
download | ydb-df35d89845ad252e6db1c6adf84da9b15de0e3b3.tar.gz |
Restoring authorship annotation for <khlebnikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/thread/pool.cpp')
-rw-r--r-- | util/thread/pool.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/thread/pool.cpp b/util/thread/pool.cpp index b17cfa8b39..05fad02e9b 100644 --- a/util/thread/pool.cpp +++ b/util/thread/pool.cpp @@ -124,8 +124,8 @@ public: Queue.Push(obj); } - QueuePushCond.Signal(); - + QueuePushCond.Signal(); + return true; } @@ -193,7 +193,7 @@ private: with_lock (StopMutex) { while (ThreadCountReal) { with_lock (QueueMutex) { - QueuePushCond.Signal(); + QueuePushCond.Signal(); } StopCond.Wait(StopMutex); @@ -213,7 +213,7 @@ private: with_lock (QueueMutex) { while (Queue.Empty() && !AtomicGet(ShouldTerminate)) { - QueuePushCond.Wait(QueueMutex); + QueuePushCond.Wait(QueueMutex); } if (AtomicGet(ShouldTerminate) && Queue.Empty()) { @@ -259,7 +259,7 @@ private: TThreadNamer Namer; mutable TMutex QueueMutex; mutable TMutex StopMutex; - TCondVar QueuePushCond; + TCondVar QueuePushCond; TCondVar QueuePopCond; TCondVar StopCond; TJobQueue Queue; |