MCPcopy Index your code
hub / github.com/BrainJS/brain.js / cleanUpNextTick

Function cleanUpNextTick

browser.js:23347–23360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23345var queueIndex = -1;
23346
23347function cleanUpNextTick() {
23348 if (!draining || !currentQueue) {
23349 return;
23350 }
23351 draining = false;
23352 if (currentQueue.length) {
23353 queue = currentQueue.concat(queue);
23354 } else {
23355 queueIndex = -1;
23356 }
23357 if (queue.length) {
23358 drainQueue();
23359 }
23360}
23361
23362function drainQueue() {
23363 if (draining) {

Callers

nothing calls this directly

Calls 1

drainQueueFunction · 0.70

Tested by

no test coverage detected