Q Stack,
is a simple library to handle a lot of calls. The idea is to put some functions on a stack and execute one after another using promises.
Q_Stack requires: Q and underscore-node
Just a simple sample:
// Defines that maximal 5 function can be executed paralllel on the "SampleStack" Stack
q_stack.maxCalls(5, "SampleStack");
// Put a function on the "SampleStack" to execute it with the arguments args1, args
q_stack.call(function () {
//do something
},
["arg1", "arg2"],
"SampleStack");
By default the "__default__" Stack is set to maxium 10 parallel executed functions.
To change the maximum default:
q_stack.maxCalls(9);
To execute something on default stack:
q_stack.call(function () {
//do something
},
["arg1", "arg2"]);
q_stack
1.0.2 • Public • PublishedPackage Sidebar
Install
npm i q_stack
Weekly Downloads
6
Version
1.0.2
License
MIT