PATH:
usr
/
local
/
lib
/
node_modules
/
pm2
/
node_modules
/
@pm2
/
io
/
node_modules
/
async
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = parallelLimit; var _eachOf = require('./eachOf'); var _eachOf2 = _interopRequireDefault(_eachOf); var _parallel = require('./internal/parallel'); var _parallel2 = _interopRequireDefault(_parallel); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Run the `tasks` collection of functions in parallel, without waiting until * the previous function has completed. If any of the functions pass an error to * its callback, the main `callback` is immediately called with the value of the * error. Once the `tasks` have completed, the results are passed to the final * `callback` as an array. * * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about * parallel execution of code. If your tasks do not use any timers or perform * any I/O, they will actually be executed in series. Any synchronous setup * sections for each task will happen one after the other. JavaScript remains * single-threaded. * * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the * execution of other tasks when a task fails. * * It is also possible to use an object instead of an array. Each property will * be run as a function and the results will be passed to the final `callback` * as an object instead of an array. This can be a more readable way of handling * results from {@link async.parallel}. * * @name parallel * @static * @memberOf module:ControlFlow * @method * @category Control Flow * @param {Array|Iterable|Object} tasks - A collection of * [async functions]{@link AsyncFunction} to run. * Each async function can complete with any number of optional `result` values. * @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). * * @example * async.parallel([ * function(callback) { * setTimeout(function() { * callback(null, 'one'); * }, 200); * }, * function(callback) { * setTimeout(function() { * callback(null, 'two'); * }, 100); * } * ], * // optional callback * function(err, results) { * // the results array will equal ['one','two'] even though * // the second function had a shorter timeout. * }); * * // an example using an object instead of an array * async.parallel({ * one: function(callback) { * setTimeout(function() { * callback(null, 1); * }, 200); * }, * two: function(callback) { * setTimeout(function() { * callback(null, 2); * }, 100); * } * }, function(err, results) { * // results is now equals to: {one: 1, two: 2} * }); */ function parallelLimit(tasks, callback) { (0, _parallel2.default)(_eachOf2.default, tasks, callback); } module.exports = exports['default'];
[-] concatLimit.js
[edit]
[-] concatSeries.js
[edit]
[-] everySeries.js
[edit]
[-] whilst.js
[edit]
[-] groupBySeries.js
[edit]
[-] asyncify.js
[edit]
[-] auto.js
[edit]
[-] find.js
[edit]
[-] concat.js
[edit]
[-] mapLimit.js
[edit]
[-] allSeries.js
[edit]
[-] tryEach.js
[edit]
[-] detectLimit.js
[edit]
[-] select.js
[edit]
[-] wrapSync.js
[edit]
[-] reflect.js
[edit]
[-] series.js
[edit]
[-] transform.js
[edit]
[-] autoInject.js
[edit]
[-] forEachLimit.js
[edit]
[-] detectSeries.js
[edit]
[-] unmemoize.js
[edit]
[-] reduce.js
[edit]
[-] memoize.js
[edit]
[+]
..
[-] doWhilst.js
[edit]
[-] everyLimit.js
[edit]
[-] priorityQueue.js
[edit]
[-] selectLimit.js
[edit]
[-] timesLimit.js
[edit]
[-] mapValuesSeries.js
[edit]
[-] queue.js
[edit]
[-] forEach.js
[edit]
[-] reflectAll.js
[edit]
[-] cargo.js
[edit]
[-] parallelLimit.js
[edit]
[-] some.js
[edit]
[-] inject.js
[edit]
[-] mapValues.js
[edit]
[-] all.js
[edit]
[-] anySeries.js
[edit]
[-] seq.js
[edit]
[-] package.json
[edit]
[-] findLimit.js
[edit]
[-] forever.js
[edit]
[-] detect.js
[edit]
[-] rejectLimit.js
[edit]
[-] retry.js
[edit]
[-] timeout.js
[edit]
[-] forEachOfSeries.js
[edit]
[-] eachOfLimit.js
[edit]
[-] nextTick.js
[edit]
[-] parallel.js
[edit]
[-] foldl.js
[edit]
[-] waterfall.js
[edit]
[-] rejectSeries.js
[edit]
[-] dir.js
[edit]
[-] reduceRight.js
[edit]
[-] times.js
[edit]
[-] someSeries.js
[edit]
[-] setImmediate.js
[edit]
[-] anyLimit.js
[edit]
[-] filterLimit.js
[edit]
[-] findSeries.js
[edit]
[-] applyEach.js
[edit]
[-] groupBy.js
[edit]
[-] eachOf.js
[edit]
[-] retryable.js
[edit]
[-] during.js
[edit]
[-] apply.js
[edit]
[-] forEachOf.js
[edit]
[-] index.js
[edit]
[-] someLimit.js
[edit]
[-] foldr.js
[edit]
[-] eachSeries.js
[edit]
[-] groupByLimit.js
[edit]
[-] race.js
[edit]
[-] reject.js
[edit]
[-] timesSeries.js
[edit]
[-] sortBy.js
[edit]
[-] doUntil.js
[edit]
[-] constant.js
[edit]
[-] ensureAsync.js
[edit]
[-] any.js
[edit]
[+]
internal
[-] map.js
[edit]
[-] filter.js
[edit]
[-] mapValuesLimit.js
[edit]
[-] every.js
[edit]
[-] compose.js
[edit]
[-] selectSeries.js
[edit]
[-] forEachOfLimit.js
[edit]
[-] filterSeries.js
[edit]
[-] each.js
[edit]
[-] eachLimit.js
[edit]
[-] README.md
[edit]
[-] eachOfSeries.js
[edit]
[-] applyEachSeries.js
[edit]
[-] bower.json
[edit]
[-] mapSeries.js
[edit]
[-] until.js
[edit]
[+]
dist
[-] forEachSeries.js
[edit]
[-] log.js
[edit]
[-] doDuring.js
[edit]
[-] LICENSE
[edit]
[-] CHANGELOG.md
[edit]
[-] allLimit.js
[edit]