MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / workLoop

Function workLoop

code/third-party/public/app.js:12484–12496  ·  view source on GitHub ↗
(isAsync)

Source from the content-addressed store, hash-verified

12482 }
12483
12484 function workLoop(isAsync) {
12485 if (!isAsync) {
12486 // Flush all expired work.
12487 while (nextUnitOfWork !== null) {
12488 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
12489 }
12490 } else {
12491 // Flush asynchronous work until the deadline runs out of time.
12492 while (nextUnitOfWork !== null && !shouldYield()) {
12493 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
12494 }
12495 }
12496 }
12497
12498 function renderRoot(root, expirationTime, isAsync) {
12499 !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;

Callers 1

renderRootFunction · 0.70

Calls 2

performUnitOfWorkFunction · 0.70
shouldYieldFunction · 0.70

Tested by

no test coverage detected