Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dispose of the host when receiving the quit command #2635

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

brettfo
Copy link
Member

@brettfo brettfo commented Jan 23, 2023

This fixes issues with the backing process not closing appropriately. Verified on both Windows and Mac.

Fixes #2527.

@@ -346,6 +344,13 @@ Command StdIO()
receiver,
startupOptions.KernelHost);

kernel.UseQuitCommand(() =>
{
host.Dispose();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately the fix was to add host.Dispose() to the quit handler.

This fixes issues with the backing process not closing appropriately.
{
var http = new HttpRequestKernelExtension();
await http.OnLoadAsync(kernel);
if (startupOptions.Preview)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question unrelated to this PR: How are people supposed to enable this? Why not publish as an extension and let people try it out via a NuGet package?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now this is enabled if you use vscode insiders or via --preview option on the command line

@colombod colombod merged commit 6239441 into dotnet:main Jan 24, 2023
@brettfo brettfo deleted the quit-command-exit-process branch January 24, 2023 17:37
@brettfo brettfo added bug Something isn't working Area-Performance labels Jan 24, 2023
@watersb
Copy link

watersb commented Mar 21, 2023

Although #2527 is marked resolved by this issue, I am still getting multiple runaway dotnet processes when closing VS Code Insiders after using Polygot Notebooks.

macOS 13.2.1 M1 MacBook Air

edits: autocorrect

@colombod
Copy link
Member

And this is with the latest release from the 15th of March? Can you share the vscode and extension and tool versions?

@jonsequitur
Copy link
Contributor

jonsequitur commented Mar 22, 2023

@watersb What version of the extension are you using, and do you have any VS Code or Polyglot Notebooks extension updates pending?

@watersb
Copy link

watersb commented Mar 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Performance bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runaway energy usage by dotnet process after quitting VSCode
4 participants