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

Method RunConsumer

examples/mpmc.cpp:153–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 }
152
153 void RunConsumer(CppBenchmark::ContextPC& context) override
154 {
155 int value = -1;
156 _queue->dequeue(value);
157 if (value == 0)
158 context.StopConsume();
159 }
160
161private:
162 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