(callback)
| 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); |
no outgoing calls
no test coverage detected