(err error)
| 310 | } |
| 311 | |
| 312 | func (ab *AsyncBuffer) setErr(err error) { |
| 313 | if err == nil { |
| 314 | return |
| 315 | } |
| 316 | |
| 317 | // If the error is already set, we do not overwrite it |
| 318 | if ab.err.Load() == nil { |
| 319 | ab.err.Store(errctx.WrapWithStackSkip(err, 1)) |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | // addChunk adds a new chunk to the AsyncBuffer, increments bytesRead |
| 324 | // and signals that a chunk is ready |
no test coverage detected