Skip to content

bwos #2172

Description

@moonbreezelate
  1. using TSAN, main branch bwos still BUG.
  2. while fixed has more performance at fix bwos queue bug #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;
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions