()
| 23360 | } |
| 23361 | |
| 23362 | function drainQueue() { |
| 23363 | if (draining) { |
| 23364 | return; |
| 23365 | } |
| 23366 | var timeout = runTimeout(cleanUpNextTick); |
| 23367 | draining = true; |
| 23368 | |
| 23369 | var len = queue.length; |
| 23370 | while(len) { |
| 23371 | currentQueue = queue; |
| 23372 | queue = []; |
| 23373 | while (++queueIndex < len) { |
| 23374 | if (currentQueue) { |
| 23375 | currentQueue[queueIndex].run(); |
| 23376 | } |
| 23377 | } |
| 23378 | queueIndex = -1; |
| 23379 | len = queue.length; |
| 23380 | } |
| 23381 | currentQueue = null; |
| 23382 | draining = false; |
| 23383 | runClearTimeout(timeout); |
| 23384 | } |
| 23385 | |
| 23386 | process.nextTick = function (fun) { |
| 23387 | var args = new Array(arguments.length - 1); |
no test coverage detected