()
| 117 | } |
| 118 | |
| 119 | execute() { |
| 120 | const promises = new Array(this._concurrencyLevel); |
| 121 | |
| 122 | for (let i = 0; i < this._concurrencyLevel; i++) { |
| 123 | promises[i] = this._executeOneAtATime(i, 0); |
| 124 | } |
| 125 | |
| 126 | return Promise.all(promises).then(() => this._result); |
| 127 | } |
| 128 | |
| 129 | _executeOneAtATime(initialIndex, iteration) { |
| 130 | const index = initialIndex + this._concurrencyLevel * iteration; |
no test coverage detected