diff --git a/examples/atomic-counters/atomic-counters.go b/examples/atomic-counters/atomic-counters.go index 683e0ec..19ee445 100644 --- a/examples/atomic-counters/atomic-counters.go +++ b/examples/atomic-counters/atomic-counters.go @@ -29,7 +29,8 @@ func main() { // address of our `ops` counter with the // `&` syntax. atomic.AddUint64(&ops, 1) - + + // Allow other goroutines to proceed. runtime.Gosched() } }()