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

Function workLoop

code/communication/public/app.js:13286–13298  ·  view source on GitHub ↗
(isAsync)

Source from the content-addressed store, hash-verified

13284 }
13285
13286 function workLoop(isAsync) {
13287 if (!isAsync) {
13288 // Flush all expired work.
13289 while (nextUnitOfWork !== null) {
13290 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13291 }
13292 } else {
13293 // Flush asynchronous work until the deadline runs out of time.
13294 while (nextUnitOfWork !== null && !shouldYield()) {
13295 nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
13296 }
13297 }
13298 }
13299
13300 function renderRoot(root, expirationTime, isAsync) {
13301 !!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