MCPcopy Create free account
hub / github.com/catboost/catboost / TFileLock

Class TFileLock

util/system/file_lock.h:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10};
11
12class TFileLock: public TFile {
13public:
14 TFileLock(const TString& filename, const EFileLockType type = EFileLockType::Exclusive);
15
16 void Acquire();
17 bool TryAcquire();
18 void Release();
19
20 inline void lock() {
21 Acquire();
22 }
23
24 inline bool try_lock() {
25 return TryAcquire();
26 }
27
28 inline void unlock() {
29 Release();
30 }
31
32private:
33 EFileLockType Type;
34};

Callers 1

AddEntryToCoreSearchFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected