MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / cleanUpNextTick

Function cleanUpNextTick

public/javascripts/socket.io.js:578–591  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

576 var queueIndex = -1;
577
578 function cleanUpNextTick() {
579 if (!draining || !currentQueue) {
580 return;
581 }
582 draining = false;
583 if (currentQueue.length) {
584 queue = currentQueue.concat(queue);
585 } else {
586 queueIndex = -1;
587 }
588 if (queue.length) {
589 drainQueue();
590 }
591 }
592
593 function drainQueue() {
594 if (draining) {

Callers

nothing calls this directly

Calls 1

drainQueueFunction · 0.70

Tested by

no test coverage detected