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

Method TryAcquireRead

util/system/rwlock.cpp:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool TRWMutex::TImpl::TryAcquireRead() noexcept {
62 with_lock (Lock_) {
63 if (BlockedWriters_ || State_ < 0) {
64 return false;
65 }
66
67 ++State_;
68 }
69
70 return true;
71}
72
73void TRWMutex::TImpl::ReleaseRead() noexcept {
74 Lock_.Acquire();

Callers 1

TryAcquireMethod · 0.80

Calls 1

LastSystemErrorTextFunction · 0.70

Tested by

no test coverage detected