MCPcopy
hub / github.com/grpc/grpc-go / init

Method init

internal/transport/transport.go:80–82  ·  view source on GitHub ↗

init allows a recvBuffer to be initialized in-place, which is useful for resetting a buffer or for avoiding a heap allocation when the buffer is embedded in another struct.

()

Source from the content-addressed store, hash-verified

78// for resetting a buffer or for avoiding a heap allocation when the buffer
79// is embedded in another struct.
80func (b *recvBuffer) init() {
81 b.c = make(chan recvMsg, 1)
82}
83
84func (b *recvBuffer) put(r recvMsg) {
85 b.mu.Lock()

Callers 5

HandleStreamsMethod · 0.45
operateHeadersMethod · 0.45
newStreamMethod · 0.45

Calls

no outgoing calls