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

Fixes a race condition with ProgressListener.End #1183

Merged

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Oct 24, 2023

WHAT

🤖 Generated by Copilot at 46dcebc

Fix a race condition in progress reporting for the F# language server. Ensure that the WorkDoneProgressEnd message is always sent last by moving the endSent flag assignment in FSharpLspClient.fs.

🤖 Generated by Copilot at 46dcebc

endSent too soon
A race condition in spring
Fixed by this change

🐛🚀🌐

WHY

HOW

🤖 Generated by Copilot at 46dcebc

  • Fix a bug where the end message for progress reporting could be sent out of order (link)


if stillNeedsToSend then
do! lspClient.Progress(x.Token, WorkDoneProgressEnd.Create(?message = message))
endSent <- true
Copy link
Member Author

Choose a reason for hiding this comment

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

lspClient.Progress could get cancelled before actually sending and endSent would be set to true

@TheAngryByrd TheAngryByrd merged commit 880f298 into ionide:main Oct 24, 2023
10 checks passed
nojaf pushed a commit to nojaf/FsAutoComplete that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant