最近,我一直在深入研究Go的源代码.当我查看sync.Pool的细节时,我发现了一条我无法理解的评论.
https://golang.org/src/sync/pool.go?s=1633:1992#L58
// Local per-P Pool appendix.
type poolLocalInternal struct {
private interface{} // Can be used only by the respective P.
shared []interface{} // Can be used by any P.
Mutex // Protects shared.
}
Run Code Online (Sandbox Code Playgroud)
本地per-P Pool附录.
per-P是什么意思?
只能由相应的P使用
P是什么意思?