Avoiding needless atomic operations