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

Method RunBasics

util/system/condvar_ut.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 Data_.failed = true; \
53 }
54 void RunBasics() {
55 Y_ASSERT(TotalIds_ == 3);
56
57 if (Id_ < 2) {
58 TGuard<TMutex> guard(Data_.mutex);
59 while (!Data_.stopWaiting.load()) {
60 bool res = Data_.condVar1.WaitT(Data_.mutex, TDuration::Seconds(1));
61 FAIL_ASSERT(res == true);
62 }
63 } else {
64 usleep(100000);
65 Data_.stopWaiting.store(true);
66
67 TGuard<TMutex> guard(Data_.mutex);
68 Data_.condVar1.Signal();
69 Data_.condVar1.Signal();
70 }
71 }
72
73 void RunBasicsWithPredicate() {
74 Y_ASSERT(TotalIds_ == 3);

Callers

nothing calls this directly

Calls 6

usleepFunction · 0.85
SecondsFunction · 0.70
loadMethod · 0.45
WaitTMethod · 0.45
storeMethod · 0.45
SignalMethod · 0.45

Tested by

no test coverage detected