48 if (element ==
nullptr)
51 uint8_t current_tail =
tail_.load(std::memory_order_relaxed);
52 uint8_t next_tail = (current_tail + 1) % SIZE;
55 uint8_t head_before =
head_.load(std::memory_order_acquire);
57 if (next_tail == head_before) {
63 was_empty = (current_tail == head_before);
64 old_tail = current_tail;
66 buffer_[current_tail] = element;
67 tail_.store(next_tail, std::memory_order_release);