* * StreamPool */ StreamPool stores all streams created by Assemblers, allowing multiple assemblers to work together on stream processing while enforcing the fact that a single stream receives its data serially. It is safe for concurrency, usable by multiple Assemblers at once. StreamPool handle
| 136 | // Assembler, though, it does have to do some locking to make sure that the |
| 137 | // connection objects it stores are accessible to multiple Assemblers. |
| 138 | type StreamPool struct { |
| 139 | conns map[key]*connection |
| 140 | users int |
| 141 | mu sync.RWMutex |
| 142 | factory StreamFactory |
| 143 | free []*connection |
| 144 | all [][]connection |
| 145 | nextAlloc int |
| 146 | newConnectionCount int64 |
| 147 | } |
| 148 | |
| 149 | func (p *StreamPool) grow() { |
| 150 | conns := make([]connection, p.nextAlloc) |
nothing calls this directly
no outgoing calls
no test coverage detected