Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Executes a function for a list of arguments but keeps sure that only a limited number of jobs is running at the same time
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Executor.js
README
test.js

README

===
API
===

var ex = new Executor(function(arg1, arg2) {
    var self = this; // Tip: save your object reference!
    // to what you have to do
    // this is bind to the executor
    do.async.stuff(function() {
        self.emit('job_done'); // this starts the next job    
    });
}

ex.push([arg1, arg2]); // add new arguments for execution

ex.startExecution(x); // start x queues

======
Events
======

- all_queues_done: All running queues are done
- job_queue_done:  A running queue is done (no more arguments left)
- job_done: you emit it, you should know it!
Something went wrong with that request. Please try again.