()
| 23971 | } |
| 23972 | |
| 23973 | function drainQueue() { |
| 23974 | if (draining) { |
| 23975 | return; |
| 23976 | } |
| 23977 | var timeout = runTimeout(cleanUpNextTick); |
| 23978 | draining = true; |
| 23979 | |
| 23980 | var len = queue.length; |
| 23981 | while(len) { |
| 23982 | currentQueue = queue; |
| 23983 | queue = []; |
| 23984 | while (++queueIndex < len) { |
| 23985 | if (currentQueue) { |
| 23986 | currentQueue[queueIndex].run(); |
| 23987 | } |
| 23988 | } |
| 23989 | queueIndex = -1; |
| 23990 | len = queue.length; |
| 23991 | } |
| 23992 | currentQueue = null; |
| 23993 | draining = false; |
| 23994 | runClearTimeout(timeout); |
| 23995 | } |
| 23996 | |
| 23997 | process.nextTick = function (fun) { |
| 23998 | var args = new Array(arguments.length - 1); |
no test coverage detected