()
| 570 | } |
| 571 | |
| 572 | func (e *Encoder) flushJobs() error { |
| 573 | js := &e.state.jobs |
| 574 | if len(js.filling) > 0 { |
| 575 | if err := e.dispatchJob(false); err != nil { |
| 576 | return err |
| 577 | } |
| 578 | } |
| 579 | e.waitAllJobs() |
| 580 | js.mu.Lock() |
| 581 | fErr := js.flusherErr |
| 582 | js.mu.Unlock() |
| 583 | return fErr |
| 584 | } |
| 585 | |
| 586 | // Close will flush the final output and close the stream. |
| 587 | // The function will block until everything has been written. |
no test coverage detected