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

Method with_lock

library/cpp/threading/future/core/future-inl.h:146–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 TSystemEvent* readyEvent = nullptr;
145
146 with_lock (StateLock) {
147 TAtomicBase state = AtomicGet(State);
148 if (Y_UNLIKELY(state != NotReady)) {
149 return false;
150 }
151
152 new (&Value) T(std::forward<TT>(value));
153
154 readyEvent = ReadyEvent.Get();
155
156 AtomicSet(State, ValueSet);
157 }
158
159 if (readyEvent) {
160 readyEvent->Signal();

Callers

nothing calls this directly

Calls 6

AtomicGetFunction · 0.50
AtomicSetFunction · 0.50
moveFunction · 0.50
GetMethod · 0.45
emplace_backMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected