Skip to content

Bounds for RwLock<T>: Send are unnecessarily restrictive #42934

Closed
@RalfJung

Description

@RalfJung

Currently, RwLock<T>: Send requires T: Send and T: Sync. It would be sufficient to requires T: Send. (Transmitting an RwLock can't move an &T across thread boundaries.)

Is there interest in relaxing these kinds of bounds? Or, maybe, at least document the fact that the bounds could be more relaxed in the source?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions