sync.Pool.New (field)
28 uses
sync (current package)
pool.go#L63: New func() any
pool.go#L154: if x == nil && p.New != nil {
pool.go#L155: x = p.New()
crypto/tls
conn.go#L967: New: func() any {
encoding/json
scanner.go#L88: New: func() any {
fmt
print.go#L147: New: func() any { return new(pp) },
scan.go#L379: New: func() any { return new(ss) },
internal/poll
splice_linux.go#L191: var splicePipePool = sync.Pool{New: newPoolPipe}
io
io.go#L656: New: func() any {
log
log.go#L166: var bufferPool = sync.Pool{New: func() any { return new([]byte) }}
net/http
h2_bundle.go#L1049: {New: func() interface{} { return new([1 << 10]byte) }},
h2_bundle.go#L1050: {New: func() interface{} { return new([2 << 10]byte) }},
h2_bundle.go#L1051: {New: func() interface{} { return new([4 << 10]byte) }},
h2_bundle.go#L1052: {New: func() interface{} { return new([8 << 10]byte) }},
h2_bundle.go#L1053: {New: func() interface{} { return new([16 << 10]byte) }},
h2_bundle.go#L1627: New: func() interface{} {
h2_bundle.go#L3152: New: func() interface{} {
h2_bundle.go#L3571: New: func() interface{} {
h2_bundle.go#L3643: var http2sorterPool = sync.Pool{New: func() interface{} { return new(http2sorter) }}
h2_bundle.go#L3900: New: func() interface{} {
h2_bundle.go#L4953: New: func() interface{} { return make(chan error, 1) },
h2_bundle.go#L4957: New: func() interface{} { return new(http2writeData) },
header.go#L161: New: func() any { return new(headerSorter) },
server.go#L820: var copyBufPool = sync.Pool{New: func() any { return new([copyBufPoolSize]byte) }}
os
dir_unix.go#L33: New: func() any {
reflect
type.go#L3009: framePool = &sync.Pool{New: func() any {
syscall
netlink_linux.go#L53: var pageBufPool = &sync.Pool{New: func() any {
vendor/golang.org/x/net/http2/hpack
huffman.go#L15: New: func() interface{} { return new(bytes.Buffer) },
 |
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |