explain gosched

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

View File

@ -30,6 +30,7 @@ func main() {
// `&` syntax. // `&` syntax.
atomic.AddUint64(&ops, 1) atomic.AddUint64(&ops, 1)
// Allow other goroutines to proceed.
runtime.Gosched() runtime.Gosched()
} }
}() }()