News for hackers. Stuff that matters.
Re:A collection of lock-free data structures written in stan... by whiteboardma on Wednesday May 10, 2023 @09:21AM (#35886954)
Looking at the Push operation defined in queue_impl.hpp, if multiple threads perform concurrent pushes, they might end up writing their element to the same slot in _data since the current position _w is not incremented atomically
Re:A collection of lock-free data structures written in stan... by dnedic on Wednesday May 10, 2023 @09:24AM (#35886995)
This is a multi producer scenario, the README clearly states that these data structures are only single producer single consumer multi thread/interrupt safe.

I will also add disclaimers to the javadocs comments on methods just to reduce confusion.

Re:A collection of lock-free data structures written in stan... by whiteboardma on Wednesday May 10, 2023 @09:32AM (#35887104)
Wops, my bad
Re:A collection of lock-free data structures written in stan... by ape4 on Wednesday May 10, 2023 @10:36AM (#35888001)
Just add a lock ;)