internal static void DisposeInteractiveHostProcess(InteractiveHost process)
        {
            IpcServerChannel serverChannel = process._ServerChannel;
            process.Dispose(joinThreads: true);

            var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel);
            listenerThread.Join();
        }
Пример #2
0
        internal static void DisposeInteractiveHostProcess(InteractiveHost host)
        {
            var serverChannel = host._ServerChannel;

            host.Dispose();

            var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel);

            listenerThread.Join();
        }
Пример #3
0
        public void Dispose()
        {
            _workspace.Dispose();
            _interactiveHost.Dispose();

            if (_currentWindow != null)
            {
                _currentWindow.SubmissionBufferAdded -= SubmissionBufferAdded;
            }
        }
Пример #4
0
        internal static void DisposeInteractiveHostProcess(InteractiveHost process)
        {
            IpcServerChannel serverChannel = process._ServerChannel;

            process.Dispose();

            var listenerThread = (Thread)s_ipcServerChannelListenerThread.GetValue(serverChannel);

            listenerThread.Join();
        }
Пример #5
0
        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();
            }
        }
Пример #6
0
        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();
            }
        }
Пример #7
0
 public void Dispose()
 {
     _workspace.Dispose();
     _interactiveHost.Dispose();
 }