callFinishFn calls the finish functions registered with the AsyncBuffer.
()
| 300 | |
| 301 | // callFinishFn calls the finish functions registered with the AsyncBuffer. |
| 302 | func (ab *AsyncBuffer) callFinishFn() { |
| 303 | ab.finishOnce.Do(func() { |
| 304 | for _, fn := range ab.finishFn { |
| 305 | if fn != nil { |
| 306 | fn() |
| 307 | } |
| 308 | } |
| 309 | }) |
| 310 | } |
| 311 | |
| 312 | func (ab *AsyncBuffer) setErr(err error) { |
| 313 | if err == nil { |
no outgoing calls
no test coverage detected