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

Method RunReaders

util/system/rwlock_ut.cpp:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 Data_.failed = true; \
46 }
47 void RunReaders() {
48 Data_.mutex.AcquireRead();
49
50 ++Data_.readersIn;
51 usleep(100);
52 FAIL_ASSERT(Data_.readersIn.load() == Total_);
53 usleep(100);
54 --Data_.readersIn;
55
56 Data_.mutex.ReleaseRead();
57 }
58
59 void RunReadersWriters() {
60 if (Id_ % 2 == 0) {

Callers

nothing calls this directly

Calls 4

usleepFunction · 0.85
AcquireReadMethod · 0.80
ReleaseReadMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected