| | |
| | | let inHandleResult = 0; |
| | | |
| | | /** |
| | | * Defines the callback callback. |
| | | * @template T |
| | | * @callback Callback |
| | | * @param {(WebpackError | null)=} err |
| | |
| | | */ |
| | | |
| | | /** |
| | | * Represents AsyncQueueEntry. |
| | | * @template T |
| | | * @template K |
| | | * @template R |
| | | */ |
| | | class AsyncQueueEntry { |
| | | /** |
| | | * Creates an instance of AsyncQueueEntry. |
| | | * @param {T} item the item |
| | | * @param {Callback<R>} callback the callback |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Defines the get key type used by this module. |
| | | * @template T, K |
| | | * @typedef {(item: T) => K} getKey |
| | | */ |
| | | |
| | | /** |
| | | * Defines the processor type used by this module. |
| | | * @template T, R |
| | | * @typedef {(item: T, callback: Callback<R>) => void} Processor |
| | | */ |
| | | |
| | | /** |
| | | * Represents AsyncQueue. |
| | | * @template T |
| | | * @template K |
| | | * @template R |
| | | */ |
| | | class AsyncQueue { |
| | | /** |
| | | * Creates an instance of AsyncQueue. |
| | | * @param {object} options options object |
| | | * @param {string=} options.name name of the queue |
| | | * @param {number=} options.parallelism how many items should be processed at once |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns context of execution. |
| | | * @returns {string} context of execution |
| | | */ |
| | | getContext() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Updates context using the provided value. |
| | | * @param {string} value context of execution |
| | | */ |
| | | setContext(value) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Processes the provided item. |
| | | * @param {T} item an item |
| | | * @param {Callback<R>} callback callback function |
| | | * @returns {void} |
| | |
| | | } |
| | | |
| | | /** |
| | | * Processes the provided item. |
| | | * @param {T} item an item |
| | | * @returns {void} |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Describes how this stop operation behaves. |
| | | * @returns {void} |
| | | */ |
| | | stop() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Increase parallelism. |
| | | * @returns {void} |
| | | */ |
| | | increaseParallelism() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Decrease parallelism. |
| | | * @returns {void} |
| | | */ |
| | | decreaseParallelism() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Checks whether this async queue is processing. |
| | | * @param {T} item an item |
| | | * @returns {boolean} true, if the item is currently being processed |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Checks whether this async queue is queued. |
| | | * @param {T} item an item |
| | | * @returns {boolean} true, if the item is currently queued |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Checks whether this async queue is done. |
| | | * @param {T} item an item |
| | | * @returns {boolean} true, if the item is currently queued |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Describes how this ensure processing operation behaves. |
| | | * @returns {void} |
| | | */ |
| | | _ensureProcessing() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Processes the provided entry. |
| | | * @param {AsyncQueueEntry<T, K, R>} entry the entry |
| | | * @returns {void} |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Processes the provided entry. |
| | | * @param {AsyncQueueEntry<T, K, R>} entry the entry |
| | | * @param {(WebpackError | null)=} err error, if any |
| | | * @param {(R | null)=} result result, if any |