WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/util/processAsyncTree.js
@@ -6,6 +6,10 @@
"use strict";
/**
 * Walks a dynamically expanding async work tree with bounded concurrency.
 * Each processed item may enqueue more items through `push`, allowing callers
 * to model breadth-first or depth-first discovery without managing the queue
 * themselves.
 * @template T
 * @template {Error} E
 * @param {Iterable<T>} items initial items
@@ -22,6 +26,8 @@
   let processScheduled = true;
   /**
    * Enqueues a newly discovered item and schedules queue processing when the
    * current concurrency budget allows more work to start.
    * @param {T} item item
    */
   const push = (item) => {
@@ -33,6 +39,8 @@
   };
   /**
    * Handles completion of a single processor call, propagating the first
    * error and scheduling more queued work when possible.
    * @param {E | null | undefined} err error
    */
   const processorCallback = (err) => {