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

Add read queue to workspace mutex #1291

Closed
msujew opened this issue Nov 15, 2023 · 1 comment · Fixed by #1310
Closed

Add read queue to workspace mutex #1291

msujew opened this issue Nov 15, 2023 · 1 comment · Fixed by #1310
Labels
LSP Language Server Protocol integration
Milestone

Comments

@msujew
Copy link
Member

msujew commented Nov 15, 2023

Right now, the workspace mutex is only able to lock on write operations - any read operation will abort the current write operation. We want to extend the mutex to allow to perform a read operation (or multiple ones in parallel) after finishing all queued write operations.

This could also resolve the issue experienced in #1290, since it's probably related to an LSP service trying to resolve a cross reference during the build process.

@msujew msujew added the LSP Language Server Protocol integration label Nov 15, 2023
@spoenemann
Copy link
Contributor

We already had a read-write lock in a previous PR: 56966f6#diff-095a6181fde780365fcff35aa085c4b5aff0ec9e081d26f716bd29bca6575974

We decided to reduce it to a simple mutex because we wanted to keep things simple. At that time, I didn't see the case where a language developer adds a custom operation that needs read access at a point in time where the document is in a clean state. We could revive that old code now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSP Language Server Protocol integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants