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

Method RunConsumer

examples/mpsc.cpp:150–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 void RunConsumer(CppBenchmark::ContextPC& context) override
151 {
152 int value = -1;
153 if (_queue->dequeue(value) && (value == 0))
154 context.StopConsume();
155 }
156
157private:
158 std::shared_ptr<mpmc_bounded_queue_t<int>> _queue;

Callers

nothing calls this directly

Calls 2

StopConsumeMethod · 0.80
dequeueMethod · 0.45

Tested by

no test coverage detected