A counter is the “hello world” of concurrent programming. Count requests, count cache hits, count bytes sent. One shared number, one line of code, and an AtomicLong makes it correct. Then you add threads, and something odd happens. Correct stops being the same as fast. At some point, adding cores to a program that does …