()
| 13291 | } |
| 13292 | |
| 13293 | function drainQueue() { |
| 13294 | if (draining) { |
| 13295 | return; |
| 13296 | } |
| 13297 | var timeout = runTimeout(cleanUpNextTick); |
| 13298 | draining = true; |
| 13299 | |
| 13300 | var len = queue.length; |
| 13301 | while(len) { |
| 13302 | currentQueue = queue; |
| 13303 | queue = []; |
| 13304 | while (++queueIndex < len) { |
| 13305 | if (currentQueue) { |
| 13306 | currentQueue[queueIndex].run(); |
| 13307 | } |
| 13308 | } |
| 13309 | queueIndex = -1; |
| 13310 | len = queue.length; |
| 13311 | } |
| 13312 | currentQueue = null; |
| 13313 | draining = false; |
| 13314 | runClearTimeout(timeout); |
| 13315 | } |
| 13316 | |
| 13317 | process.nextTick = function (fun) { |
| 13318 | var args = new Array(arguments.length - 1); |
no test coverage detected