AnonSec Team
Server IP : 161.35.85.9  /  Your IP : 216.73.217.138
Web Server : nginx/1.30.1
System : Linux cheapdeb-ams3 7.0.9+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.9-1 (2026-05-22) x86_64
User : root ( 0)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/nodejs/async/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /usr/share/nodejs/async/parallelLimit.js
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = parallelLimit;
var _eachOfLimit = _interopRequireDefault(require("./internal/eachOfLimit.js"));
var _parallel = _interopRequireDefault(require("./internal/parallel.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
 * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name parallelLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.parallel]{@link module:ControlFlow.parallel}
 * @category Control Flow
 * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 * @returns {Promise} a promise, if a callback is not passed
 */
function parallelLimit(tasks, limit, callback) {
  return (0, _parallel.default)((0, _eachOfLimit.default)(limit), tasks, callback);
}
module.exports = exports.default;

AnonSec - 2021