(data *ring.Ring)
| 27 | } |
| 28 | |
| 29 | func reader(data *ring.Ring) { |
| 30 | for { |
| 31 | cell := data.Dequeue() |
| 32 | if cell == nil { |
| 33 | panic("invalid value") |
| 34 | } |
| 35 | |
| 36 | atomic.AddInt64(&TotalRead, cell.Size) |
| 37 | cell.Release() |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func monitor(data *ring.Ring) { |
| 42 | for { |