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

Prevent the same workspace from being lazily launched more than once #2693

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

vinistock
Copy link
Member

Motivation

I still can't seem to reproduce #2681, but the only way I can think of launching multiple workspaces is if some other VS Code extension is causing numerous didOpenTextDocument events to be launched all at the same time.

In theory, if that happens we could find ourselves in a race condition, because launching the workspace takes a while.

Implementation

This PR tries to fix the problem by remembering which workspaces are being activated. We then return early if multiple documents are causing the lazy activation of the same workspace.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Oct 8, 2024
@vinistock vinistock self-assigned this Oct 8, 2024
@vinistock vinistock requested a review from a team as a code owner October 8, 2024 21:10
@vinistock vinistock merged commit 2a36402 into main Oct 9, 2024
35 checks passed
@vinistock vinistock deleted the vs-prevent-same-workspace-launch branch October 9, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants