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

Method RunConsumer

examples/spsc.cpp:235–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233 }
234
235 void RunConsumer(CppBenchmark::ContextPC& context) override
236 {
237 int value = -1;
238 _queue->dequeue(value);
239 if (value == 0)
240 context.StopConsume();
241 }
242
243private:
244 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