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

Method with_lock

util/thread/pool.cpp:117–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 with_lock (QueueMutex) {
118 while (MaxQueueSize > 0 && Queue.Size() >= MaxQueueSize && !ShouldTerminate.load()) {
119 if (!Blocking) {
120 return false;
121 }
122 QueuePopCond.Wait(QueueMutex);
123 }
124
125 if (ShouldTerminate.load()) {
126 return false;
127 }
128
129 Queue.Push(obj);
130 }
131
132 QueuePushCond.Signal();
133

Callers

nothing calls this directly

Calls 9

SizeMethod · 0.45
loadMethod · 0.45
WaitMethod · 0.45
PushMethod · 0.45
BroadCastMethod · 0.45
SignalMethod · 0.45
EmptyMethod · 0.45
DestroyMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected