MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / drainQueue

Function drainQueue

code/dependency-injection/public/app.js:961–983  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

959}
960
961function drainQueue() {
962 if (draining) {
963 return;
964 }
965 var timeout = runTimeout(cleanUpNextTick);
966 draining = true;
967
968 var len = queue.length;
969 while(len) {
970 currentQueue = queue;
971 queue = [];
972 while (++queueIndex < len) {
973 if (currentQueue) {
974 currentQueue[queueIndex].run();
975 }
976 }
977 queueIndex = -1;
978 len = queue.length;
979 }
980 currentQueue = null;
981 draining = false;
982 runClearTimeout(timeout);
983}
984
985process.nextTick = function (fun) {
986 var args = new Array(arguments.length - 1);

Callers 1

cleanUpNextTickFunction · 0.70

Calls 2

runTimeoutFunction · 0.70
runClearTimeoutFunction · 0.70

Tested by

no test coverage detected