diff options
author | loudhorr <loudhorr@yandex-team.ru> | 2022-02-10 16:46:26 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:26 +0300 |
commit | cda908cacb24be13e419866da89ff4fbeea31f89 (patch) | |
tree | cc0bc607920fb1192332619d57eb874402a23bff /util/system/file_lock.h | |
parent | 48030071922c430b2b2ffbf612d75c7afbf7a2c0 (diff) | |
download | ydb-cda908cacb24be13e419866da89ff4fbeea31f89.tar.gz |
Restoring authorship annotation for <loudhorr@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/file_lock.h')
-rw-r--r-- | util/system/file_lock.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/file_lock.h b/util/system/file_lock.h index b2aaff5baf..f9b7891fef 100644 --- a/util/system/file_lock.h +++ b/util/system/file_lock.h @@ -5,18 +5,18 @@ #include <util/system/file.h> enum class EFileLockType { - Exclusive, - Shared -}; - -class TFileLock: public TFile { -public: - TFileLock(const TString& filename, const EFileLockType type = EFileLockType::Exclusive); - + Exclusive, + Shared +}; + +class TFileLock: public TFile { +public: + TFileLock(const TString& filename, const EFileLockType type = EFileLockType::Exclusive); + void Acquire(); bool TryAcquire(); void Release(); - + inline void lock() { Acquire(); } @@ -29,6 +29,6 @@ public: Release(); } -private: - EFileLockType Type; +private: + EFileLockType Type; }; |