WithErrors converts the pool to an ErrorPool so the submitted tasks can return errors.
()
| 115 | // WithErrors converts the pool to an ErrorPool so the submitted tasks can |
| 116 | // return errors. |
| 117 | func (p *Pool) WithErrors() *ErrorPool { |
| 118 | p.panicIfInitialized() |
| 119 | return &ErrorPool{ |
| 120 | pool: p.deref(), |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | // deref is a helper that creates a shallow copy of the pool with the same |
| 125 | // settings. We don't want to just dereference the pointer because that makes |