diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /util/system/sem.h | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/sem.h')
-rw-r--r-- | util/system/sem.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/sem.h b/util/system/sem.h index 0c964ad6b6..545dc263be 100644 --- a/util/system/sem.h +++ b/util/system/sem.h @@ -1,7 +1,7 @@ #pragma once - -#include "defaults.h" - + +#include "defaults.h" + #include <util/generic/ptr.h> //named sempahore @@ -9,21 +9,21 @@ class TSemaphore { public: TSemaphore(const char* name, ui32 maxFreeCount); ~TSemaphore(); - + //Increase the semaphore counter. void Release() noexcept; - + //Keep a thread held while the semaphore counter is equal 0. void Acquire() noexcept; - + //Try to enter the semaphore gate. A non-blocking variant of Acquire. //Returns 'true' if the semaphore counter decreased bool TryAcquire() noexcept; - + private: class TImpl; THolder<TImpl> Impl_; -}; +}; //unnamed semaphore, faster, than previous class TFastSemaphore { |