Skip to content

Mutex<T> should be Share even if T isn't #13125

Description

@sfackler

I think it's sound? It seems like a straightforward solution would be to add a #[force_share] attribute. We could also add an UnsafeForceShare marker type, but I think that'd be a bit strange since unlike the other markers, this one would remove a restriction on the type, not add one.

The current situation requires some gross workarounds like this: rust-postgres/rust-postgres@98c92c1

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