Fuery
A pausable function queue with optional parallel concurrency
Install
$ npm install fuery
Examples
Create a Fuery instance
var Fuery = queue = ; // Allow only 1 function to run at a time (default is unlimited)queuelimit = 1;
Queue a function
The first argument is a function that you should call when the function has completed.
queue;
You can also add your own arguments like this
queue;
Set context
You can set the context the queued functions run in. When not set, the context defaults to null.
queue;
Start the queue
New Fuery instances are paused upon creation, they always need to be started
queuestart;
Pause the queue
Pausing the queue is also possible, ofcourse. You can supply a callback that will fire when all currently running functions have ended.
queue;
License
MIT