You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove excessive mutex synchronization (#3637)
### Motivation
With the improvements to the position scanners (#3612 and #3583), we're now seeing some cases of invalid location being raised, despite no reports of any issues regarding the state of the documents.
I think we're making a mistake by trying to apply document operations with higher priority than feature requests. For example, if we receive a request for completion and the user immediately edits the file, the server might process the edit before finishing the completion request and there are no guarantees that the new state of the document can satisfy that original request.
I want to propose pushing text synchronization operations to the queue, so that they are processed in order and without locking, which I believe will improve the situation.
### Implementation
I start pushing text synchronization operations to the work queue and removed many of the mutex locks that we originally had.
Since requests are processed in order, there should not be a chance of a feature request being processed with an incorrect document state.
Co-authored-by: vinistock <[email protected]>
0 commit comments