Recently, I've been digging into Go's source code. When I looked into the details of sync.Pool, I found a comment I couldn't understand.
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.
}
Local per-P Pool appendix.
What does per-P mean?
Can be used only by the respective P
What does P mean?