How to avoid Data Race?

ha ha. Does it really work?