| 1072 | } |
| 1073 | |
| 1074 | async dispose(id: string, options: { backend?: string } = {}): Promise<void> { |
| 1075 | const backendId = this.#resolveId(options.backend) || this.#defaultId; |
| 1076 | const { shell, handle } = await this.#shellFor(backendId); |
| 1077 | try { |
| 1078 | await shell.dispose(id); |
| 1079 | } catch (error) { |
| 1080 | this.#onError(backendId, handle, error); |
| 1081 | throw error; |
| 1082 | } |
| 1083 | } |
| 1084 | |
| 1085 | // Wrap an ExecHandle so a transport-classified rejection from |
| 1086 | // result() invalidates the cached backend handle. The dispatch- |