|
|
@ -119,6 +119,12 @@ public: |
|
|
|
} else if constexpr (OverflowStrategy::on_overflow == overflow_response_t::must_overflow) { |
|
|
|
if(!fence.compare_exchange_weak(fence_v, new_offset, std::memory_order_release, std::memory_order_relaxed)) { |
|
|
|
return std::nullopt; |
|
|
|
} else { |
|
|
|
offset_t v; |
|
|
|
do { |
|
|
|
v = read_lead.load(std::memory_order_acquire); |
|
|
|
if(v >= new_offset) break; |
|
|
|
} while(read_lead.compare_exchange_weak(v, new_offset, std::memory_order_release, std::memory_order_relaxed)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
static_assert( |
|
|
|