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

Method RunConsumer

examples/spsc.cpp:64–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 void RunConsumer(CppBenchmark::ContextPC& context) override
65 {
66 int value = -1;
67 if (_queue->try_dequeue(value) && (value == 0))
68 context.StopConsume();
69 }
70
71private:
72 std::shared_ptr<TReaderWriterQueue> _queue;

Callers

nothing calls this directly

Calls 2

StopConsumeMethod · 0.80
try_dequeueMethod · 0.45

Tested by

no test coverage detected