Update pool.go

Comment update.
This commit is contained in:
Kai Dong 2019-04-18 20:17:43 +08:00 committed by GitHub
parent c226f6432d
commit 133b4670be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ func (p *Pool) getSlow(pid int) interface{} {
// Caller must call runtime_procUnpin() when done with the pool.
func (p *Pool) pin() (*poolLocal, int) {
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.
// 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).