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

Method SyncStop

library/cpp/neh/netliba.cpp:378–384  ·  view source on GitHub ↗

thread safe method for disable proxy callbacks to parent (OnRequest(...))

Source from the content-addressed store, hash-verified

376
377 //thread safe method for disable proxy callbacks to parent (OnRequest(...))
378 void SyncStop() {
379 P_.store(nullptr, std::memory_order_release);
380 while (!RequesterPtrPotector_.TryAcquire()) {
381 Sleep(TDuration::MicroSeconds(100));
382 }
383 RequesterPtrPotector_.Release();
384 }
385
386 private:
387 typedef THashMap<TGUID, TIntrusivePtr<TSrvRequestState>, TGUIDHash> TStatesInProcessRequests;

Callers 1

ShutdownMethod · 0.45

Calls 5

SleepFunction · 0.85
MicroSecondsFunction · 0.85
storeMethod · 0.45
TryAcquireMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected