MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / startCheck

Function startCheck

ui/media/js/engine.js:1343–1362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1341 }
1342 let taskPromise = undefined
1343 function startCheck() {
1344 if (taskPromise?.isPending) {
1345 return
1346 }
1347 do {
1348 if (taskPromise?.resolvedValue instanceof Promise) {
1349 taskPromise = makeQuerablePromise(taskPromise.resolvedValue)
1350 continue
1351 }
1352 if (typeof navigator?.scheduling?.isInputPending === "function" && navigator.scheduling.isInputPending()) {
1353 return
1354 }
1355 const continuePromise = continueTasks().catch(async function (err) {
1356 console.error(err)
1357 await eventSource.fireEvent(EVENT_UNHANDLED_REJECTION, { reason: err })
1358 await asyncDelay(RETRY_DELAY_ON_ERROR)
1359 })
1360 taskPromise = makeQuerablePromise(continuePromise)
1361 } while (taskPromise?.isResolved)
1362 }
1363
1364 const SD = {
1365 ChunkedStreamReader,

Callers

nothing calls this directly

Calls 4

makeQuerablePromiseFunction · 0.85
continueTasksFunction · 0.85
asyncDelayFunction · 0.85
fireEventMethod · 0.80

Tested by

no test coverage detected