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

Method ThreadProc

library/cpp/chromium_trace/sampler.cpp:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void* TSamplerThread::ThreadProc() noexcept {
39 Tracer->AddCurrentThreadName(TStringBuf("TraceSampler"));
40 Tracer->AddCurrentThreadIndex(10000); // Stick it to the bottom
41
42 while (true) {
43 with_lock (SamplersLock) {
44 RunSamplers();
45 }
46 with_lock (SignalLock) {
47 if (!Continue) {
48 break;
49 }
50 CV.WaitT(SignalLock, Interval);
51 }
52 }
53
54 return nullptr;
55}
56
57void TSamplerThread::SetInterval(TDuration interval) {
58 with_lock (SignalLock) {

Callers

nothing calls this directly

Calls 2

AddCurrentThreadNameMethod · 0.80
AddCurrentThreadIndexMethod · 0.80

Tested by

no test coverage detected