* Describes how this ensure processing operation behaves. * @returns {void}
()
| 327 | * @returns {void} |
| 328 | */ |
| 329 | _ensureProcessing() { |
| 330 | while (this._activeTasks < this._parallelism) { |
| 331 | const entry = this._queued.dequeue(); |
| 332 | if (entry === undefined) break; |
| 333 | this._activeTasks++; |
| 334 | entry.state = PROCESSING_STATE; |
| 335 | this._startProcessing(entry); |
| 336 | } |
| 337 | this._willEnsureProcessing = false; |
| 338 | if (this._queued.length > 0) return; |
| 339 | if (this._children !== undefined) { |
| 340 | for (const child of this._children) { |
| 341 | while (this._activeTasks < this._parallelism) { |
| 342 | const entry = child._queued.dequeue(); |
| 343 | if (entry === undefined) break; |
| 344 | this._activeTasks++; |
| 345 | entry.state = PROCESSING_STATE; |
| 346 | child._startProcessing(entry); |
| 347 | } |
| 348 | if (child._queued.length > 0) return; |
| 349 | } |
| 350 | } |
| 351 | if (!this._willEnsureProcessing) this._needProcessing = false; |
| 352 | } |
| 353 | |
| 354 | /** |
| 355 | * Processes the provided entry. |
nothing calls this directly
no test coverage detected