Weird behavior with Atomic

Expected (i.e. how others do it). From the documentation

Performs x[] += val atomically. Returns the old value.

1 Like