MCPcopy Index your code
hub / github.com/MoonHighway/learning-react / drainQueue

Function drainQueue

chapter-12/server-render-recipes/assets/bundle.js:179–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177}
178
179function drainQueue() {
180 if (draining) {
181 return;
182 }
183 var timeout = runTimeout(cleanUpNextTick);
184 draining = true;
185
186 var len = queue.length;
187 while(len) {
188 currentQueue = queue;
189 queue = [];
190 while (++queueIndex < len) {
191 if (currentQueue) {
192 currentQueue[queueIndex].run();
193 }
194 }
195 queueIndex = -1;
196 len = queue.length;
197 }
198 currentQueue = null;
199 draining = false;
200 runClearTimeout(timeout);
201}
202
203process.nextTick = function (fun) {
204 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