MCPcopy Create free account
hub / github.com/chronoxor/CppBenchmark / RunConsumer

Method RunConsumer

examples/mpsc.cpp:194–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 }
193
194 void RunConsumer(CppBenchmark::ContextPC& context) override
195 {
196 int value = -1;
197 _queue->dequeue(value);
198 if (value == 0)
199 context.StopConsume();
200 }
201
202private:
203 std::shared_ptr<lock_bounded_queue_t<int>> _queue;

Callers

nothing calls this directly

Calls 2

StopConsumeMethod · 0.80
dequeueMethod · 0.45

Tested by

no test coverage detected