deref is a helper that creates a shallow copy of the pool with the same settings. We don't want to just dereference the pointer because that makes the copylock lint angry.
()
| 125 | // settings. We don't want to just dereference the pointer because that makes |
| 126 | // the copylock lint angry. |
| 127 | func (p *Pool) deref() Pool { |
| 128 | p.panicIfInitialized() |
| 129 | return Pool{ |
| 130 | limiter: p.limiter, |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | // WithContext converts the pool to a ContextPool for tasks that should |
| 135 | // run under the same context, such that they each respect shared cancellation. |
no test coverage detected