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

Make with_doc_mut take a mutable reference to doc handle #53

Open
gterzian opened this issue Sep 18, 2023 · 0 comments
Open

Make with_doc_mut take a mutable reference to doc handle #53

gterzian opened this issue Sep 18, 2023 · 0 comments

Comments

@gterzian
Copy link
Collaborator

gterzian commented Sep 18, 2023

The with_doc_mut method of DocHandle requires having an immutable reference to the doc handle on which it is called. Internally, it takes a write lock on the document.

This makes it possible to get a deadlock by calling with_doc_mut within with_doc_mut. If we change the method to take a mutable reference such code will not compile.

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

No branches or pull requests

1 participant