###execQ
pending the commands and execute them in a right time.
used in project RocketEngine
####Install
npm install execq
####Usages
var execQ = new require('execq');
execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, argv]);
execQ.pend([socket, socket.write, [arg1, arg2...]]);
execQ.pend(function(){
worker.on('works done', function () {
execQ.goon();
});
####API
var execQ = new require('exdecq')(maxlen);
maxlen default to 1000
execQ.length
execQ.pend(operation);
- operation {Array | Function}
ex:
[object, function, [arg1, arg2, ..., argn]]
execQ.goon(seqnum);
execute the commands from the seqnum
execQ.clean();
execQ will emit event pending on invoking .pend(), and emit event continue on finish invoking .goon()