MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / pop

Method pop

external/atomic_queue/atomic_queue.h:319–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 }
318
319 auto pop() noexcept {
320 unsigned tail;
321 if(Derived::spsc_) {
322 tail = tail_.load(X);
323 tail_.store(tail + 1, X);
324 }
325 else {
326 constexpr auto memory_order = Derived::total_order_ ? std::memory_order_seq_cst : std::memory_order_relaxed;
327 tail = tail_.fetch_add(1, memory_order); // FIFO and total order on Intel regardless, as of 2019.
328 }
329 return static_cast<Derived&>(*this).do_pop(tail);
330 }
331
332 bool was_empty() const noexcept {
333 return !was_size();

Callers

nothing calls this directly

Calls 2

loadMethod · 0.45
do_popMethod · 0.45

Tested by

no test coverage detected