aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/file_lock.h
diff options
context:
space:
mode:
authorloudhorr <loudhorr@yandex-team.ru>2022-02-10 16:46:26 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:26 +0300
commitcda908cacb24be13e419866da89ff4fbeea31f89 (patch)
treecc0bc607920fb1192332619d57eb874402a23bff /util/system/file_lock.h
parent48030071922c430b2b2ffbf612d75c7afbf7a2c0 (diff)
downloadydb-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.h22
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;
};