MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / waitForIdle

Function waitForIdle

src/Data/CoreCacheSync.js:42–54  ·  view source on GitHub ↗
(syncEpoch)

Source from the content-addressed store, hash-verified

40}
41
42function waitForIdle(syncEpoch) {
43 return new Promise((resolve) => {
44 if (!shouldContinue(syncEpoch)) {
45 resolve();
46 return;
47 }
48 if ("requestIdleCallback" in window) {
49 window.requestIdleCallback(resolve, {timeout: 2000});
50 } else {
51 window.setTimeout(resolve, 0);
52 }
53 });
54}
55
56async function loadSafely(load) {
57 try {

Callers 2

prefetchInBatchesFunction · 0.85
prefetchProfilesFunction · 0.85

Calls 1

shouldContinueFunction · 0.85

Tested by

no test coverage detected