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

Method RunConsumer

examples/spsc.cpp:191–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

StopConsumeMethod · 0.80
dequeueMethod · 0.45

Tested by

no test coverage detected