MCPcopy Create free account
hub / github.com/bloomberg/quantum / decNumElements

Method decNumElements

quantum/impl/quantum_queue_statistics_impl.h:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67inline
68void QueueStatistics::decNumElements()
69{
70 size_t oldValue = 1;
71 size_t newValue = 0;
72 while(!_numElements.compare_exchange_weak(oldValue, newValue, std::memory_order_acq_rel))
73 {
74 if (oldValue == 0)
75 {
76 break;
77 }
78 else
79 {
80 newValue = oldValue - 1;
81 }
82 }
83}
84
85inline
86size_t QueueStatistics::errorCount() const

Callers 3

runMethod · 0.80
doDequeueMethod · 0.80
doDequeueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected