@Sanne, out of curiosity, can you explain the multiple attempts at incrementing here?  Admittedly, I don't have much experience with atomics...