()
| 311 | export const getExecutorBundle = () => loadSharedHandle(); |
| 312 | |
| 313 | export const disposeExecutor = async (): Promise<void> => { |
| 314 | const currentHandlePromise = sharedHandlePromise; |
| 315 | sharedHandlePromise = null; |
| 316 | |
| 317 | const disposeCurrent = async (): Promise<void> => { |
| 318 | const handle = currentHandlePromise ? await handleOrNull(currentHandlePromise) : null; |
| 319 | if (handle) { |
| 320 | await ignorePromiseFailure("disposeExecutor", () => handle.dispose()); |
| 321 | } |
| 322 | }; |
| 323 | |
| 324 | const nextLifecycle = sharedHandleLifecycle.then(disposeCurrent, disposeCurrent); |
| 325 | sharedHandleLifecycle = nextLifecycle.then( |
| 326 | () => undefined, |
| 327 | () => undefined, |
| 328 | ); |
| 329 | await nextLifecycle; |
| 330 | }; |
| 331 | |
| 332 | export const reloadExecutor = async () => { |
| 333 | await disposeExecutor(); |
no outgoing calls