4 ms·
I put off reading the book for ages because I was convinced that knowing about locks and atomic data accesses, and intentionally keeping things simple would be
by maxlybbert 6y ago
I put off reading the book for ages because I was convinced that knowing about locks and atomic data accesses, and intentionally keeping things simple would be enough to stay out of trouble.
The book certainly does cover how to coordinate between multiple threads, but it goes further by pointing out that the real secret to multithreaded programming is designing things so that coordination is kept to a minimum. For one thing, the coordination often has the side effect of purging your CPU caches! You definitely get a lot of cache misses. Even if you use atomic operations on primitive types.
I believe you can get a lot out of the book even if you already know Java’s or POSIX’s threading models.