Move initial part of LSP loading off the UI thread.#53662
Merged
CyrusNajmabadi merged 2 commits intodotnet:mainfrom May 25, 2021
Merged
Move initial part of LSP loading off the UI thread.#53662CyrusNajmabadi merged 2 commits intodotnet:mainfrom
CyrusNajmabadi merged 2 commits intodotnet:mainfrom
Conversation
dibarbet
approved these changes
May 25, 2021
| var token = this._asynchronousOperationListener.BeginAsyncOperation("LoadAsync"); | ||
| // Trigger a fire and forget request to the VS LSP client to load our ILanguageClient. | ||
| // This needs to be done with .Forget() as the LoadAsync (VS LSP client) synchronously stores the result task of OnLoadedAsync. | ||
| // The synchronous execution happens under the sln load threaded wait dialog, so user actions cannot be made in between triggering LoadAsync and storing the result task from OnLoadedAsync. |
Member
There was a problem hiding this comment.
FYI @gundermanc - this bit is no longer happening synchronously so unless the implementation has changed with the LSP client refactor, there could be cases where ctrl+Q search returns no results if it's called before the OnLoadedAsync task is stored.
We can't do this on the UI thread so ctrl+Q may need to be updated to be resilient where possible
Contributor
Author
There was a problem hiding this comment.
@gundermanc if we need that scenario to work, and for features like ctrl-q to be able to wait for servers to start up, then we'll need some mechanism for the client to asynchronously call in and wait for the server to be totally loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53573