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

Function CoMutex

library/cpp/coroutine/engine/coroutine_ut.cpp:262–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260static TContMutex mutex;
261
262static void CoMutex(TCont* c, void* /*run*/) {
263 {
264 mutex.LockI(c);
265 c->Yield();
266 res += c->Name();
267 mutex.UnLock();
268 }
269
270 c->Yield();
271
272 {
273 mutex.LockI(c);
274 c->Yield();
275 res += c->Name();
276 mutex.UnLock();
277 }
278}
279
280static void CoMutexTest(TCont* c, void* /*run*/) {
281 c->Executor()->Create(CoMutex, nullptr, "1");

Callers

nothing calls this directly

Calls 4

LockIMethod · 0.80
YieldMethod · 0.80
UnLockMethod · 0.80
NameMethod · 0.45

Tested by

no test coverage detected