BatchingChannel implements the Channel interface, with the change that instead of producing individual elements on Out(), it batches together the entire internal buffer each time. Trying to construct an unbuffered batching channel will panic, that configuration is not supported (and provides no bene
| 4 | // on Out(), it batches together the entire internal buffer each time. Trying to construct an unbuffered batching channel |
| 5 | // will panic, that configuration is not supported (and provides no benefit over an unbuffered NativeChannel). |
| 6 | type BatchingChannel struct { |
| 7 | input, output chan interface{} |
| 8 | length chan int |
| 9 | buffer []interface{} |
| 10 | size BufferCap |
| 11 | } |
| 12 | |
| 13 | func NewBatchingChannel(size BufferCap) *BatchingChannel { |
| 14 | if size == None { |
nothing calls this directly
no outgoing calls
no test coverage detected