| 36 | } |
| 37 | |
| 38 | void* 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 | |
| 57 | void TSamplerThread::SetInterval(TDuration interval) { |
| 58 | with_lock (SignalLock) { |
nothing calls this directly
no test coverage detected