MCPcopy Create free account
hub / github.com/microsoft/SandDance / scheduleSyncCallback

Function scheduleSyncCallback

docs/external/js/react-dom.development.js:11180–11194  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

11178 return Scheduler_scheduleCallback(priorityLevel, callback, options);
11179 }
11180 function scheduleSyncCallback(callback) {
11181 // Push this callback into an internal queue. We'll flush these either in
11182 // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
11183 if (syncQueue === null) {
11184 syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
11185
11186 immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
11187 } else {
11188 // Push onto existing queue. Don't need to schedule a callback because
11189 // we already scheduled one when we created the queue.
11190 syncQueue.push(callback);
11191 }
11192
11193 return fakeCallbackNode;
11194 }
11195 function cancelCallback(callbackNode) {
11196 if (callbackNode !== fakeCallbackNode) {
11197 Scheduler_cancelCallback(callbackNode);

Callers 1

ensureRootIsScheduledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected