最近,我一直在研究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.
}局部P池阑尾。
每-P是什么意思?
只能由相应的P使用。
P是什么意思?
https://stackoverflow.com/questions/49332257
复制相似问题