operation-queue
Queue logic using the waiting states buttons and execute using the blocking states buttons.
blocking states
(opQueue.getSuccessHandler())(counter++);
(opQueue.getFailureHandler())(counter++);
opQueue.reset();
waiting states
opQueue.queue(function(result) {
demoLog("Success " + result);
}
opQueue.queue({
onFailure: function(result) {
demoLog("Failure " + result);
}
}
opQueue.queue({
onSuccess: function(result) {
demoLog("Both Success: " + result);
}
onFailure: function(result) {
demoLog("Both Failure " + result);
}
}
log
Note that operations executed immediately will report undefined as their parameter value