targetDelay time.Duration,
shrinkFactor float64,
p := &AdaptivePool{
ts: ts,
minWorkers: minWorkers,
maxWorkers: maxWorkers,
targetDelay: targetDelay,
shrinkFactor: shrinkFactor,
ch: make(chan func()),
stopCh: make(chan struct{}),
}
for range minWorkers {
go p.work()
}
return p
}