explain gosched
This commit is contained in:
parent
2c8af9ae1c
commit
05b6731f1f
@ -29,7 +29,8 @@ func main() {
|
|||||||
// address of our `ops` counter with the
|
// address of our `ops` counter with the
|
||||||
// `&` syntax.
|
// `&` syntax.
|
||||||
atomic.AddUint64(&ops, 1)
|
atomic.AddUint64(&ops, 1)
|
||||||
|
|
||||||
|
// Allow other goroutines to proceed.
|
||||||
runtime.Gosched()
|
runtime.Gosched()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user