MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / callback

Function callback

src/renderer/util/queue.ts:18–38  ·  view source on GitHub ↗
(...args)

Source from the content-addressed store, hash-verified

16 let queued: Parameters<T> | undefined;
17
18 const callback: QueueOneWrapper<T> = (...args) => {
19 if (isBusy) {
20 queued = args;
21 } else {
22 isBusy = true;
23
24 fn(...args)
25 .catch(error => {
26 console.error('queueOne - Error thrown in wrapped function!', error);
27 })
28 .finally(() => {
29 isBusy = false;
30
31 if (queued) {
32 const next = queued;
33 queued = undefined;
34 callback(...next);
35 }
36 });
37 }
38 };
39
40 return callback;
41}

Callers 15

executeFunction · 0.85
GameGridClass · 0.85
useTransformOnItemSelectFunction · 0.85
useTransformOnItemSelectFunction · 0.85
useThrottleFunction · 0.85
onAppReadyFunction · 0.85
onAppReadyFunction · 0.85
onAppReadyFunction · 0.85
debouncerFunction · 0.85
throttlerFunction · 0.85
api_handle_messageFunction · 0.85
iterateDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected