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

Function with_lock

util/thread/pool_ut.cpp:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 for (size_t i = 0; i < expectedNames.size(); ++i) {
213 pool.SafeAddFunc([&]() {
214 with_lock (lock) {
215 if (++readyCount == expectedNames.size()) {
216 allReady.BroadCast();
217 } else {
218 while (readyCount != expectedNames.size()) {
219 allReady.WaitI(lock);
220 }
221 }
222 names.insert(TThread::CurrentThreadName());
223 }
224 });
225 }
226 pool.Stop();

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
BroadCastMethod · 0.45
WaitIMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected