Eliminated data race found by TSan
The code looks like it was trying to illustrate correct atomic vs incorrect non-atomic.
But the incorrect case is undefined behaviour and really shouldn't be done at all.
The code looks like it was trying to illustrate correct atomic vs incorrect non-atomic.
But the incorrect case is undefined behaviour and really shouldn't be done at all.