MUTATE_QUEUE = new Queue( "MUTATE", {
onComplete: function () {
queueState.lastTask = null;
isFlushing = false;
},
onFirstTask: function () {
addedTask = true;
}
});
var queues = {
Queue: Queue,
PriorityQueue: PriorityQueue,
CompletionQueue: CompletionQueue,
DomOrderQueue: DomOrderQueue,
notifyQueue: NOTIFY_QUEUE,
deriveQueue: DERIVE_QUEUE,
domQueue: DOM_QUEUE,
domUIQueue: DOM_UI_QUEUE,
mutateQueue: MUTATE_QUEUE,
batch: {
start: function () {
batchStartCounter++;
if ( batchStartCounter === 1 ) {
batchNum++;
batchData = {number: batchNum};
}
},
stop: function () {
batchStartCounter--;
if ( batchStartCounter === 0 ) {
if ( addedTask ) {
addedTask = false;
isFlushing = true;
NOTIFY_QUEUE.flush();
}
}
},