Commit 5ccaf2c6 authored by Kai Dong's avatar Kai Dong Committed by Austin Clements

sync: update comment

Comment update.

Change-Id: If0d054216f9953f42df04647b85c38008b85b026
GitHub-Last-Rev: 133b4670be6dd1c94d16361c3a7a4bbdf8a355ab
GitHub-Pull-Request: golang/go#31539
Reviewed-on: https://go-review.googlesource.com/c/go/+/172700Reviewed-by: default avatarAustin Clements <austin@google.com>
parent 4aeac68c
...@@ -194,7 +194,7 @@ func (p *Pool) getSlow(pid int) interface{} { ...@@ -194,7 +194,7 @@ func (p *Pool) getSlow(pid int) interface{} {
// Caller must call runtime_procUnpin() when done with the pool. // Caller must call runtime_procUnpin() when done with the pool.
func (p *Pool) pin() (*poolLocal, int) { func (p *Pool) pin() (*poolLocal, int) {
pid := runtime_procPin() pid := runtime_procPin()
// In pinSlow we store to localSize and then to local, here we load in opposite order. // In pinSlow we store to local and then to localSize, here we load in opposite order.
// Since we've disabled preemption, GC cannot happen in between. // Since we've disabled preemption, GC cannot happen in between.
// Thus here we must observe local at least as large localSize. // Thus here we must observe local at least as large localSize.
// We can observe a newer/larger local, it is fine (we must observe its zero-initialized-ness). // We can observe a newer/larger local, it is fine (we must observe its zero-initialized-ness).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment