async-queue

simple FIFO queue to execute async functions linear.

npm install async-queue
2 downloads in the last week
6 downloads in the last month

AsyncQueue

Build Status

Installation

npm install async-queue

Example

var AsyncQueue = require('async-queue');

new AsyncQueue(function (err, job) {
    if (err) job.fail(err);
    setTimeout(function () {
        console.log('First job executed')
        job.success();
    }, 500);
}, function (err, job) {
    console.log('Second job executed');
    job.success();
}).run();

Output

First job executed
Second job executed

Run Tests

npm install
npm test
npm loves you