Close encounters of the Java Memory Model kind

https://shipilev.net/blog/2016/close-encounters-of-jmm-kind/

For those who haven't seen it before and are interested in writing concurrent algorithms or data structures in Java, this is an excellent read on the potential pitfalls you can fall into reasoning about memory ordering in Java.

Goes without saying that you need a really good reason to actually write such code, but for those who are curious or, God forbid, have to maintain code like this it's a really useful read.

17 points · 1 comments · view on lemmy.world

1 Comments

rath@lemmy.world · 1 pts · 3y

Oh wow, didn't expect this to be so comprehensive! Very nice resource.