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

Function newQueue

internal/profiling/buffer/buffer.go:52–58  ·  view source on GitHub ↗

Allocates and returns a new *queue. size needs to be an exponent of two.

(size uint32)

Source from the content-addressed store, hash-verified

50
51// Allocates and returns a new *queue. size needs to be an exponent of two.
52func newQueue(size uint32) *queue {
53 return &queue{
54 arr: make([]unsafe.Pointer, size),
55 size: size,
56 mask: size - 1,
57 }
58}
59
60// drainWait blocks the caller until all Pushes on this queue are complete.
61func (q *queue) drainWait() {

Callers 1

newQueuePairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected