NewWaitBuffer returns a new WaitBuffer. It can be used as a plain thread-safe io.Writer even if WaitFor is never called.
()
| 31 | // NewWaitBuffer returns a new WaitBuffer. It can be used as a |
| 32 | // plain thread-safe io.Writer even if WaitFor is never called. |
| 33 | func NewWaitBuffer() *WaitBuffer { |
| 34 | return &WaitBuffer{} |
| 35 | } |
| 36 | |
| 37 | // Write implements io.Writer. It is safe for concurrent use. |
| 38 | func (wb *WaitBuffer) Write(p []byte) (int, error) { |
no outgoing calls