()
| 7431 | } |
| 7432 | |
| 7433 | function drainQueue() { |
| 7434 | if (draining) { |
| 7435 | return; |
| 7436 | } |
| 7437 | var timeout = runTimeout(cleanUpNextTick); |
| 7438 | draining = true; |
| 7439 | |
| 7440 | var len = queue.length; |
| 7441 | while(len) { |
| 7442 | currentQueue = queue; |
| 7443 | queue = []; |
| 7444 | while (++queueIndex < len) { |
| 7445 | if (currentQueue) { |
| 7446 | currentQueue[queueIndex].run(); |
| 7447 | } |
| 7448 | } |
| 7449 | queueIndex = -1; |
| 7450 | len = queue.length; |
| 7451 | } |
| 7452 | currentQueue = null; |
| 7453 | draining = false; |
| 7454 | runClearTimeout(timeout); |
| 7455 | } |
| 7456 | |
| 7457 | process.nextTick = function (fun) { |
| 7458 | var args = new Array(arguments.length - 1); |
no test coverage detected