()
| 24 | } |
| 25 | |
| 26 | func newOutboundQueue() *outboundQueue { |
| 27 | q := &outboundQueue{ |
| 28 | c: make(chan *QueueOutboundElementsContainer, QueueOutboundSize), |
| 29 | } |
| 30 | q.wg.Add(1) |
| 31 | go func() { |
| 32 | q.wg.Wait() |
| 33 | close(q.c) |
| 34 | }() |
| 35 | return q |
| 36 | } |
| 37 | |
| 38 | // A inboundQueue is similar to an outboundQueue; see those docs. |
| 39 | type inboundQueue struct { |