queue
Queues a method to be called.
batch.queue(task)
Queues a method to be called in the current collecting queue if there is one. If there is a dispatching queue, it will create a batch and add the task to that batch. Finally, if there is no batch, the task will be executed immediately.
var me = {
say: function(message){
console.log(this.name,"says", message);
}
}
batch.queue([me.say, me, ["hi"]]);
Parameters
- task
{Array<function,*,Array>}
:An array that details a function to be called, the context the function should be called with, and the arguments to the function like:
[function,context, [arg1, arg2]]