MCPcopy Index your code
hub / github.com/plotly/dash / flushWork

Function flushWork

dash/deps/react@18.2.0.js:2597–2633  ·  view source on GitHub ↗
(hasTimeRemaining, initialTime)

Source from the content-addressed store, hash-verified

2595 }
2596
2597 function flushWork(hasTimeRemaining, initialTime) {
2598
2599
2600 isHostCallbackScheduled = false;
2601
2602 if (isHostTimeoutScheduled) {
2603 // We scheduled a timeout but it's no longer needed. Cancel it.
2604 isHostTimeoutScheduled = false;
2605 cancelHostTimeout();
2606 }
2607
2608 isPerformingWork = true;
2609 var previousPriorityLevel = currentPriorityLevel;
2610
2611 try {
2612 if (enableProfiling) {
2613 try {
2614 return workLoop(hasTimeRemaining, initialTime);
2615 } catch (error) {
2616 if (currentTask !== null) {
2617 var currentTime = getCurrentTime();
2618 markTaskErrored(currentTask, currentTime);
2619 currentTask.isQueued = false;
2620 }
2621
2622 throw error;
2623 }
2624 } else {
2625 // No catch in prod code path.
2626 return workLoop(hasTimeRemaining, initialTime);
2627 }
2628 } finally {
2629 currentTask = null;
2630 currentPriorityLevel = previousPriorityLevel;
2631 isPerformingWork = false;
2632 }
2633 }
2634
2635 function workLoop(hasTimeRemaining, initialTime) {
2636 var currentTime = initialTime;

Callers

nothing calls this directly

Calls 4

getCurrentTimeFunction · 0.85
cancelHostTimeoutFunction · 0.70
workLoopFunction · 0.70
markTaskErroredFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…