Skip to content

Only one subscriber for kernels for onDidChangeSelectedNotebooks - #204417

Merged
Peng Lyu (rebornix) merged 2 commits into
microsoft:mainfrom
andyscho:fix-lots-of-kernel-subscribers
Mar 7, 2024
Merged

Peng Lyu (rebornix) merged 2 commits into
microsoft:mainfrom
andyscho:fix-lots-of-kernel-subscribers

Conversation

@andyscho

@andyscho Andy Schoenberger (andyscho) commented Feb 5, 2024 •

Copy link
Copy Markdown
Contributor

This fixes the issue in #204416 (and microsoft/vscode-jupyter#15075)

This change just switches from each kernel that's added getting its own individual listener to just having a single listener for all the kernels. This way the number of listeners doesn't grow arbitrarily large to the point where it hits a threshold. Alternative solutions could include setting a higher threshold for the leakage monitoring for the relevant Emitter or failing with a more user-friendly error if there are lots of kernels added, but this seems nicer.

@andyscho

Andy Schoenberger (andyscho) commented Feb 5, 2024 •

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Jane Street"

@rebornix

Copy link
Copy Markdown
Contributor

Thanks for the contribution, will merge this change in next debt week.

@rebornix
Peng Lyu (rebornix) merged commit 59ec734 into microsoft:main Mar 7, 2024
@rebornix

Copy link
Copy Markdown
Contributor

Merged in main, thanks Andy Schoenberger (@andyscho) for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants