Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
whiteboardma
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
whiteboardma
3y ago
Wops, my bad
2.
▲
by
whiteboardma
3y ago
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
3.
▲
by
whiteboardma
3y ago
I've only looked at the queue implementation, but both push and pop contain obvious race conditions; I would highly suggest adding tests that actually use the data structures from multiple threads.