Skip to content

Make with_doc_mut take a mutable reference to doc handle #53

Open
@gterzian

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions