MCPcopy
hub / github.com/webpack/webpack / _ensureProcessing

Method _ensureProcessing

lib/util/AsyncQueue.js:329–352  ·  view source on GitHub ↗

* Describes how this ensure processing operation behaves. * @returns {void}

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

_startProcessingMethod · 0.95
dequeueMethod · 0.45

Tested by

no test coverage detected