func (p *Pool) pin() (*poolLocal, int) {
	pid := runtimex.Pin()
	s := atomic.LoadUintptr(&p.localSize)  
	l := p.local                           
	if uintptr(pid) < s {
		return indexLocal(l, pid), pid
	}
	return p.pinSlow()
}
pin pins the current goroutine to P, disables preemption and
returns poolLocal pool for the P and the P's id.
Caller must call runtime_procUnpin() when done with the pool.
package syncx
import (
	"runtime"
	"sync"
	"sync/atomic"
	"unsafe"
	"github.com/bytedance/gopkg/internal/runtimex"
)
type Pool struct {
	noCopy noCopy
	local     unsafe.Pointer  
	localSize uintptr         
	newSize int32  
	gcSize  int32  
	New func() interface{}
	NoGC bool
}
type noCopy struct{}
func (*noCopy) Lock()   {}
func (*noCopy) Unlock() {}
const blockSize = 256
type block [blockSize]interface{}
const shared = 0
const unused = 1
type poolLocalInternal struct {
	pidx    int     
	private *block  
	shared [2]poolChain
}
type poolLocal struct {
	poolLocalInternal
	pad [128 - unsafe.Sizeof(poolLocalInternal{})%128]byte
}
func (p *Pool) Put(x interface{}) {
	if x == nil {
		return
	}
	l, pid := p.pin()
	if l.pidx >= blockSize {
		l.shared[shared].pushHead(l.private)
		l.pidx, l.private = 0, nil
	}
	if l.private == nil {
		l.private, _ = l.shared[unused].popHead()
		if l.private == nil {
			l.private = p.getSlow(pid, unused)
		}
		if l.private == nil {
			l.private = &block{}
		}
	}
	l.private[l.pidx] = x
	l.pidx++
	x = nil
	runtimex.Unpin()
}
func (p *Pool) Get() (x interface{}) {
	l, pid := p.pin()
	if l.pidx > 0 {
		l.pidx--
		x = l.private[l.pidx]
		l.private[l.pidx] = nil
	}
	if x == nil {
		var b, _ = l.shared[shared].popHead()
		if b == nil {
			b = p.getSlow(pid, shared)
		}
		if b != nil {
			if l.private != nil {
				l.shared[unused].pushHead(l.private)
			}
			l.private = b
			l.pidx = blockSize - 1
			x = l.private[l.pidx]
			l.private[l.pidx] = nil
		}
	}
	runtimex.Unpin()
	if x == nil && p.New != nil {
		atomic.AddInt32(&p.newSize, 1)
		x = p.New()
	}
	return x
}
func (p *Pool) getSlow(pid int, idx int) *block {
	size := atomic.LoadUintptr(&p.localSize)  
	locals := p.local                         
	for i := 0; i < int(size); i++ {
		l := indexLocal(locals, (pid+i+1)%int(size))
		if x, _ := l.shared[idx].popTail(); x != nil {
			return x
		}
	}
	return nil
}