()
| 330 | export const getExecutorBundle = () => loadSharedHandle(); |
| 331 | |
| 332 | export 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 | |
| 351 | export const reloadExecutor = async () => { |
| 352 | await disposeExecutor(); |
no outgoing calls