[<<][softarch][>>][..]
Mon Apr 29 08:52:53 EDT 2019

Lock free queue

In the single writer / single reader case, where the reader can just
poll, is it enough to have a volatile read/write pointer?

https://stackoverflow.com/questions/2334987/looking-for-a-lock-free-rt-safe-single-reader-single-writer-structure

It looks like this is ok because:
- pointers are only updated by a single thread
- pointer is updated after data is written
- reads are atomic

So the reading side will always see a consistent state.




[Reply][About]
[<<][softarch][>>][..]