MCPcopy Index your code
hub / github.com/pomber/didact / workLoop

Function workLoop

didact.js:157–171  ·  view source on GitHub ↗
(deadline)

Source from the content-addressed store, hash-verified

155let deletions = null
156
157function workLoop(deadline) {
158 let shouldYield = false
159 while (nextUnitOfWork && !shouldYield) {
160 nextUnitOfWork = performUnitOfWork(
161 nextUnitOfWork
162 )
163 shouldYield = deadline.timeRemaining() < 1
164 }
165
166 if (!nextUnitOfWork && wipRoot) {
167 commitRoot()
168 }
169
170 requestIdleCallback(workLoop)
171}
172
173requestIdleCallback(workLoop)
174

Callers

nothing calls this directly

Calls 2

performUnitOfWorkFunction · 0.85
commitRootFunction · 0.85

Tested by

no test coverage detected