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

Function disposeExecutor

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

Source from the content-addressed store, hash-verified

300export const getExecutorBundle = () => loadSharedHandle();
301
302export const disposeExecutor = async (): Promise<void> => {
303 const currentHandlePromise = sharedHandlePromise;
304 sharedHandlePromise = null;
305
306 const disposeCurrent = async (): Promise<void> => {
307 const handle = currentHandlePromise ? await handleOrNull(currentHandlePromise) : null;
308 if (handle) {
309 await ignorePromiseFailure("disposeExecutor", () => handle.dispose());
310 }
311 };
312
313 const nextLifecycle = sharedHandleLifecycle.then(disposeCurrent, disposeCurrent);
314 sharedHandleLifecycle = nextLifecycle.then(
315 () => undefined,
316 () => undefined,
317 );
318 await nextLifecycle;
319};
320
321export const reloadExecutor = async () => {
322 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