I use golang 1.17. And this code 8e48ac5638a972ffd4b003b88379949e691edbe8 to simulate race condition. For each run I always get `100` but there should be different numbers. What might be wrong? Don't we need locking anymore?
I use golang 1.17. And this code 8e48ac5 to simulate race condition.
For each run I always get
100but there should be different numbers.What might be wrong? Don't we need locking anymore?