multi-threaded-queue
Pure Javascript, simple multi-threaded queue simulation for nodejs
Usage
var multiThreadedQueue = ;var queue = size opt;
- size: no of simultaneous threads
- opt: { ..optional.. }
- autoStart: true, // enable/disable auto start on object insertion, good to use with continuous queue insertion
- executeFunction: function(obj,next){ .... }, // shorthand for execute function, def. same as below
- completeFunction: function(){ ... } // shorthand for complete function, def. same as below
// on each objectqueue; // on completionqueue; // add objects to the queuequeue;queue;......queue; // start processing the queue (not needed if autoStart enabled)queuestart;
Tests
npm test
Release History
- 1.0.0 Initial release
- 1.1.0 Optimizations
- 1.2.0 GetQueueSize implemented