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

Struct Unbounded

internal/buffer/unbounded.go:39–45  ·  view source on GitHub ↗

Unbounded is an implementation of an unbounded buffer which does not use extra goroutines. This is typically used for passing updates from one entity to another within gRPC. All methods on this type are thread-safe and don't block on anything except the underlying mutex used for synchronization. U

Source from the content-addressed store, hash-verified

37// new type specific implementation of this buffer is preferred. See
38// internal/transport/transport.go for an example of this.
39type Unbounded struct {
40 c chan any
41 closed bool
42 closing bool
43 mu sync.Mutex
44 backlog []any
45}
46
47// NewUnbounded returns a new instance of Unbounded.
48func NewUnbounded() *Unbounded {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected