Close shuts down the SharedBuffer. It is an error to call Close while channels are still using the buffer (I'm not really sure what would happen if you do so).
()
| 77 | //Close shuts down the SharedBuffer. It is an error to call Close while channels are still using |
| 78 | //the buffer (I'm not really sure what would happen if you do so). |
| 79 | func (buf *SharedBuffer) Close() { |
| 80 | // TODO: what if there are still active channels using this buffer? |
| 81 | close(buf.in) |
| 82 | } |
| 83 | |
| 84 | func (buf *SharedBuffer) mainLoop() { |
| 85 | for { |
no outgoing calls