All Projects → feross → Run Parallel

feross / Run Parallel

Licence: mit
Run an array of functions in parallel

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Run Parallel

Parallec
Fast Parallel Async HTTP/SSH/TCP/UDP/Ping Client Java Library. Aggregate 100,000 APIs & send anywhere in 20 lines of code. Ping/HTTP Calls 8000 servers in 12 seconds. (Akka) www.parallec.io
Stars: ✭ 777 (+139.81%)
Mutual labels:  async, parallel
Async
Async utilities for Golang.
Stars: ✭ 72 (-77.78%)
Mutual labels:  async, parallel
Parallel Ssh
Asynchronous parallel SSH client library.
Stars: ✭ 864 (+166.67%)
Mutual labels:  async, parallel
Storage Based Queue
Javascript queue library with persistent storage based queue mechanism for the browsers environments. Specially designed for offline.
Stars: ✭ 33 (-89.81%)
Mutual labels:  async, browser
Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (-49.38%)
Mutual labels:  async, parallel
P Map
Map over promises concurrently
Stars: ✭ 639 (+97.22%)
Mutual labels:  async, parallel
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (-79.63%)
Mutual labels:  async, parallel
Asyncenumerable
Defines IAsyncEnumerable, IAsyncEnumerator, ForEachAsync(), ParallelForEachAsync(), and other useful stuff to use with async-await
Stars: ✭ 367 (+13.27%)
Mutual labels:  async, parallel
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (-58.95%)
Mutual labels:  async, parallel
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (-63.89%)
Mutual labels:  async, parallel
Run Waterfall
Run an array of functions in series, each passing its results to the next function
Stars: ✭ 83 (-74.38%)
Mutual labels:  async, browser
Run Series
Run an array of functions in series
Stars: ✭ 223 (-31.17%)
Mutual labels:  async, browser
Loadjs
A tiny async loader / dependency manager for modern browsers (899 bytes)
Stars: ✭ 2,507 (+673.77%)
Mutual labels:  async, parallel
Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (-25.93%)
Mutual labels:  async, browser
Swiftwebvc
A drop-in inline browser for your Swift iOS app.
Stars: ✭ 307 (-5.25%)
Mutual labels:  browser
Async Techniques Python Course
Async Techniques and Examples in Python Course
Stars: ✭ 314 (-3.09%)
Mutual labels:  async
Rawkit
🦊 Immediately Open Chrome DevTools when debugging Node.js apps
Stars: ✭ 306 (-5.56%)
Mutual labels:  browser
Php Watcher
Monitor for any changes in your php application and automatically restart it (suitable for async apps).
Stars: ✭ 303 (-6.48%)
Mutual labels:  async
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+973.77%)
Mutual labels:  async
Webclgl
GPGPU Javascript library 🐸
Stars: ✭ 313 (-3.4%)
Mutual labels:  parallel

run-parallel ci npm downloads javascript style guide

Run an array of functions in parallel

parallel Sauce Test Status

install

npm install run-parallel

usage

parallel(tasks, [callback])

Run the tasks array 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.

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 the results.

arguments
  • tasks - An array or object containing functions to run. Each function is passed a callback(err, result) which it must call on completion with an error err (which can be null) and an optional result value.
  • callback(err, results) - An optional callback to run once all the functions have completed. This function gets a results array (or object) containing all the result arguments passed to the task callbacks.
example
var parallel = require('run-parallel')

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.
})

This module is basically equavalent to async.parallel, but it's handy to just have the one function you need instead of the kitchen sink. Modularity! Especially handy if you're serving to the browser and need to reduce your javascript bundle size.

Works great in the browser with browserify!

see also

license

MIT. Copyright (c) Feross Aboukhadijeh.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].