NewContextWriter wraps a writer to make it respect given Context. If there is a blocking write, the returned Writer will return whenever the context is cancelled (the return values are n=0 and err=ctx.Err()).
(ctx context.Context, w io.Writer)
| 135 | // If there is a blocking write, the returned Writer will return whenever the |
| 136 | // context is cancelled (the return values are n=0 and err=ctx.Err()). |
| 137 | func NewContextWriter(ctx context.Context, w io.Writer) io.Writer { |
| 138 | return ctxio.NewWriter(ctx, w) |
| 139 | } |
| 140 | |
| 141 | // NewContextReader wraps a reader to make it respect given Context. |
| 142 | // If there is a blocking read, the returned Reader will return whenever the |
no outgoing calls
searching dependent graphs…