explain gosched

This commit is contained in:
Mark McGranaghan 2013-06-20 08:11:40 -07:00
parent 2c8af9ae1c
commit 05b6731f1f

View File

@ -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()
}
}()