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

Function drainQueue

code/higher-order-components/public/app.js:862–884  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

860}
861
862function drainQueue() {
863 if (draining) {
864 return;
865 }
866 var timeout = runTimeout(cleanUpNextTick);
867 draining = true;
868
869 var len = queue.length;
870 while(len) {
871 currentQueue = queue;
872 queue = [];
873 while (++queueIndex < len) {
874 if (currentQueue) {
875 currentQueue[queueIndex].run();
876 }
877 }
878 queueIndex = -1;
879 len = queue.length;
880 }
881 currentQueue = null;
882 draining = false;
883 runClearTimeout(timeout);
884}
885
886process.nextTick = function (fun) {
887 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