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

Function flushWork

dash/deps/react@16.14.0.js:2564–2609  ·  view source on GitHub ↗
(hasTimeRemaining, initialTime)

Source from the content-addressed store, hash-verified

2562 }
2563
2564 function flushWork(hasTimeRemaining, initialTime) {
2565 {
2566 markSchedulerUnsuspended(initialTime);
2567 } // We'll need a host callback the next time work is scheduled.
2568
2569
2570 isHostCallbackScheduled = false;
2571
2572 if (isHostTimeoutScheduled) {
2573 // We scheduled a timeout but it's no longer needed. Cancel it.
2574 isHostTimeoutScheduled = false;
2575 cancelHostTimeout();
2576 }
2577
2578 isPerformingWork = true;
2579 var previousPriorityLevel = currentPriorityLevel;
2580
2581 try {
2582 if (enableProfiling) {
2583 try {
2584 return workLoop(hasTimeRemaining, initialTime);
2585 } catch (error) {
2586 if (currentTask !== null) {
2587 var currentTime = getCurrentTime();
2588 markTaskErrored(currentTask, currentTime);
2589 currentTask.isQueued = false;
2590 }
2591
2592 throw error;
2593 }
2594 } else {
2595 // No catch in prod codepath.
2596 return workLoop(hasTimeRemaining, initialTime);
2597 }
2598 } finally {
2599 currentTask = null;
2600 currentPriorityLevel = previousPriorityLevel;
2601 isPerformingWork = false;
2602
2603 {
2604 var _currentTime = getCurrentTime();
2605
2606 markSchedulerSuspended(_currentTime);
2607 }
2608 }
2609 }
2610
2611 function workLoop(hasTimeRemaining, initialTime) {
2612 var currentTime = initialTime;

Callers

nothing calls this directly

Calls 6

markSchedulerUnsuspendedFunction · 0.85
getCurrentTimeFunction · 0.85
markSchedulerSuspendedFunction · 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…