flush unlocks the reader, allowing it to return all data as usual
()
| 101 | |
| 102 | // flush unlocks the reader, allowing it to return all data as usual |
| 103 | func (r *blockingReader) flush() { |
| 104 | r.unlocking.Store(true) // allow reading data without blocking |
| 105 | r.mu.Unlock() // and continue |
| 106 | } |
| 107 | |
| 108 | // generateSourceData generates a byte slice with 4.5 chunks of data |
| 109 | func generateSourceData(t *testing.T, size int) ([]byte, *countingReader) { |
no outgoing calls
no test coverage detected