Thread safety with std::vector (accessing and modifying different vector items with different threads)
I’m new in the world of parallel computing and dong many researches in data races and how to avoid those. The concept is quite clear to me, but I would have a question regarding the use of std::vector and modifications of their items by different threads.
How do memory barriers achieve thread-safety?
In C#10 in a Nutshell, Joseph Albahari writes: