1. using `TSAN`, main branch bwos still BUG. 2. while fixed has more performance at #1752 ` template <class Tp, class Allocator> lifo_queue<Tp, Allocator>::lifo_queue( std::size_t num_blocks, std::size_t block_size, Allocator allocator) : blocks_( std::max(static_cast<size_t>(2), std::bit_ceil(num_blocks)), block_type(block_size, allocator), allocator_of_t<block_type>(allocator)) , mask_(blocks_.size() - 1) { blocks_[owner_block_.load()].reclaim(); // fixed by there. blocks_[thief_block_.load()].head = block_size; blocks_[thief_block_.load()].tail = block_size; blocks_[thief_block_.load()].steal_head = block_size; } `
TSAN, main branch bwos still BUG.`
template <class Tp, class Allocator>
lifo_queue<Tp, Allocator>::lifo_queue(
std::size_t num_blocks,
std::size_t block_size,
Allocator allocator)
: blocks_(
std::max(static_cast<size_t>(2), std::bit_ceil(num_blocks)),
block_type(block_size, allocator),
allocator_of_t<block_type>(allocator))
, mask_(blocks_.size() - 1) {
blocks_[owner_block_.load()].reclaim();
// fixed by there.
blocks_[thief_block_.load()].head = block_size;
blocks_[thief_block_.load()].tail = block_size;
blocks_[thief_block_.load()].steal_head = block_size;
}
`