MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / disposeExecutor

Function disposeExecutor

apps/local/src/executor.ts:332–349  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

330export const getExecutorBundle = () => loadSharedHandle();
331
332export const disposeExecutor = async (): Promise<void> => {
333 const currentHandlePromise = sharedHandlePromise;
334 sharedHandlePromise = null;
335
336 const disposeCurrent = async (): Promise<void> => {
337 const handle = currentHandlePromise ? await handleOrNull(currentHandlePromise) : null;
338 if (handle) {
339 await ignorePromiseFailure("disposeExecutor", () => handle.dispose());
340 }
341 };
342
343 const nextLifecycle = sharedHandleLifecycle.then(disposeCurrent, disposeCurrent);
344 sharedHandleLifecycle = nextLifecycle.then(
345 () => undefined,
346 () => undefined,
347 );
348 await nextLifecycle;
349};
350
351export const reloadExecutor = async () => {
352 await disposeExecutor();

Callers 6

closeServerHandlersFunction · 0.90
createServerHandlersFunction · 0.90
disposeServerHandlersFunction · 0.90
executor.test.tsFile · 0.90
reloadExecutorFunction · 0.85

Calls

no outgoing calls

Tested by 1