WithMaxGoroutines limits the number of goroutines in a pool. Defaults to unlimited. Panics if n < 1.
(n int)
| 63 | // WithMaxGoroutines limits the number of goroutines in a pool. |
| 64 | // Defaults to unlimited. Panics if n < 1. |
| 65 | func (p *ErrorPool) WithMaxGoroutines(n int) *ErrorPool { |
| 66 | p.panicIfInitialized() |
| 67 | p.pool.WithMaxGoroutines(n) |
| 68 | return p |
| 69 | } |
| 70 | |
| 71 | // deref is a helper that creates a shallow copy of the pool with the same |
| 72 | // settings. We don't want to just dereference the pointer because that makes |
nothing calls this directly
no test coverage detected