internal static void DisposeInteractiveHostProcess(InteractiveHost process) { IpcServerChannel serverChannel = process._ServerChannel; process.Dispose(joinThreads: true); var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel); listenerThread.Join(); }
internal static void DisposeInteractiveHostProcess(InteractiveHost host) { var serverChannel = host._ServerChannel; host.Dispose(); var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel); listenerThread.Join(); }
public void Dispose() { _workspace.Dispose(); _interactiveHost.Dispose(); if (_currentWindow != null) { _currentWindow.SubmissionBufferAdded -= SubmissionBufferAdded; } }
internal static void DisposeInteractiveHostProcess(InteractiveHost process) { IpcServerChannel serverChannel = process._ServerChannel; process.Dispose(); var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel); listenerThread.Join(); }
public async Task DisposeAsync() { var service = await Host.TryGetServiceAsync(); Assert.NotNull(service); var process = service!.Process; Host.Dispose(); // the process should be terminated if (process != null && !process.HasExited) { process.WaitForExit(); } }
public override void Dispose() { try { var process = _host.TryGetProcess(); _host.Dispose(); // the process should be terminated if (process != null && !process.HasExited) { process.WaitForExit(); } } finally { // Dispose temp files only after the InteractiveHost exits, // so that assemblies are unloaded. base.Dispose(); } }
public void Dispose() { _workspace.Dispose(); _interactiveHost.Dispose(); }