43 if (element ==
nullptr)
46 uint8_t current_tail =
tail_.load(std::memory_order_relaxed);
47 uint8_t next_tail = (current_tail + 1) % SIZE;
50 uint8_t head_before =
head_.load(std::memory_order_acquire);
52 if (next_tail == head_before) {
58 was_empty = (current_tail == head_before);
59 old_tail = current_tail;
61 buffer_[current_tail] = element;
62 tail_.store(next_tail, std::memory_order_release);