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

Method Release

util/system/rwlock.cpp:123–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void TRWMutex::TImpl::Release() noexcept {
124 Lock_.Acquire();
125
126 if (State_ > 0) {
127 if (--State_ > 0) {
128 Lock_.Release();
129 } else if (BlockedWriters_) {
130 Lock_.Release();
131 WriteCond_.Signal();
132 }
133 } else {
134 State_ = 0;
135
136 if (BlockedWriters_) {
137 Lock_.Release();
138 WriteCond_.Signal();
139 } else {
140 Lock_.Release();
141 ReadCond_.Signal();
142 }
143 }
144}
145
146#else /* POSIX threads */
147

Callers 2

ReleaseReadMethod · 0.45
ReleaseWriteMethod · 0.45

Calls 3

LastSystemErrorTextFunction · 0.70
AcquireMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected