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

Method DequeuerAll

util/thread/lfstack_ut.cpp:68–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 void DequeuerAll() {
69 StartLatch.CountDown();
70 StartLatch.Await();
71
72 TVector<int> temp;
73 while (LeftToDequeue.load() > 0) {
74 size_t dequeued = 0;
75 for (size_t i = 0; i < 100; ++i) {
76 temp.clear();
77 if (SingleConsumer) {
78 Stack.DequeueAllSingleConsumer(&temp);
79 } else {
80 Stack.DequeueAll(&temp);
81 }
82 dequeued += temp.size();
83 }
84 LeftToDequeue -= dequeued;
85 }
86 }
87
88 void Run() {
89 TVector<TSimpleSharedPtr<NThreading::TLegacyFuture<>>> futures;

Callers

nothing calls this directly

Calls 7

CountDownMethod · 0.45
AwaitMethod · 0.45
loadMethod · 0.45
clearMethod · 0.45
DequeueAllMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected