MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / drainQueue

Function drainQueue

Il2cppHook/_Ufunc.js:13293–13315  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13291}
13292
13293function 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
13317process.nextTick = function (fun) {
13318 var args = new Array(arguments.length - 1);

Callers 1

cleanUpNextTickFunction · 0.85

Calls 2

runTimeoutFunction · 0.85
runClearTimeoutFunction · 0.85

Tested by

no test coverage detected