* Disconnect from the kernel and clean up resources.
()
| 166 | * Disconnect from the kernel and clean up resources. |
| 167 | */ |
| 168 | async disconnect(): Promise<void> { |
| 169 | if (this.session) { |
| 170 | try { |
| 171 | await this.session.shutdown() |
| 172 | } catch { |
| 173 | // Ignore shutdown errors |
| 174 | } |
| 175 | this.session.dispose() |
| 176 | this.session = null |
| 177 | } |
| 178 | |
| 179 | if (this.sessionManager) { |
| 180 | this.sessionManager.dispose() |
| 181 | this.sessionManager = null |
| 182 | } |
| 183 | |
| 184 | if (this.kernelManager) { |
| 185 | this.kernelManager.dispose() |
| 186 | this.kernelManager = null |
| 187 | } |
| 188 | |
| 189 | this.kernel = null |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Convert a Jupyter message to an IOutput object. |
no outgoing calls
no test coverage detected