Just a lock around the `+=1` would be enough, I guess.