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

Method RunBasics

util/system/mutex_ut.cpp:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 Data_.failed = true; \
49 }
50 void RunBasics() {
51 Data_.mutex.Acquire();
52
53 ui32 oldCounter = ui32(Data_.sharedCounter + Id_);
54 Data_.sharedCounter = oldCounter;
55 usleep(10 + RandomNumber<ui32>() % 10);
56 FAIL_ASSERT(Data_.sharedCounter == oldCounter);
57
58 Data_.mutex.Release();
59 }
60
61 void RunFakeMutex() {
62 bool res = Data_.fakeMutex.TryAcquire();

Callers

nothing calls this directly

Calls 3

usleepFunction · 0.85
AcquireMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected