diff options
author | loudhorr <[email protected]> | 2022-02-10 16:46:26 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:26 +0300 |
commit | f46e9ad72f0ae2f165fb2886ea34043ff5995753 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/file_lock.h | |
parent | cda908cacb24be13e419866da89ff4fbeea31f89 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 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 f9b7891fefa..b2aaff5baf8 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; }; |