()
| 52770 | if (queue.length) drainQueue(); |
| 52771 | } |
| 52772 | function drainQueue() { |
| 52773 | if (draining) return; |
| 52774 | var timeout = runTimeout(cleanUpNextTick); |
| 52775 | draining = true; |
| 52776 | var len = queue.length; |
| 52777 | while(len){ |
| 52778 | currentQueue = queue; |
| 52779 | queue = []; |
| 52780 | while(++queueIndex < len)if (currentQueue) currentQueue[queueIndex].run(); |
| 52781 | queueIndex = -1; |
| 52782 | len = queue.length; |
| 52783 | } |
| 52784 | currentQueue = null; |
| 52785 | draining = false; |
| 52786 | runClearTimeout(timeout); |
| 52787 | } |
| 52788 | process.nextTick = function(fun) { |
| 52789 | var args = new Array(arguments.length - 1); |
| 52790 | if (arguments.length > 1) for(var i = 1; i < arguments.length; i++)args[i - 1] = arguments[i]; |
no test coverage detected