waitForReadLoop waits for the cancelReader to finish its read loop.
()
| 108 | |
| 109 | // waitForReadLoop waits for the cancelReader to finish its read loop. |
| 110 | func (p *Program) waitForReadLoop() { |
| 111 | select { |
| 112 | case <-p.readLoopDone: |
| 113 | case <-time.After(500 * time.Millisecond): //nolint:mnd |
| 114 | // The read loop hangs, which means the input |
| 115 | // cancelReader's cancel function has returned true even |
| 116 | // though it was not able to cancel the read. |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | const ( |
| 121 | defaultWidth = 80 |
no outgoing calls
no test coverage detected