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
| 37 | // new type specific implementation of this buffer is preferred. See |
| 38 | // internal/transport/transport.go for an example of this. |
| 39 | type 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. |
| 48 | func NewUnbounded() *Unbounded { |
nothing calls this directly
no outgoing calls
no test coverage detected