(config: PoolConfig = defaultConfig)
| 21 | private currentConcurrency: number |
| 22 | |
| 23 | constructor(config: PoolConfig = defaultConfig) { |
| 24 | const { concurrency, started, tasks } = { |
| 25 | ...defaultConfig, |
| 26 | ...config, |
| 27 | } |
| 28 | this.running = started! |
| 29 | this.pending = tasks as Array<() => Promise<any>> |
| 30 | this.currentConcurrency = concurrency! |
| 31 | } |
| 32 | |
| 33 | private tick() { |
| 34 | if (!this.running) { |
nothing calls this directly
no outgoing calls
no test coverage detected