Skip to content

Arc should only require Sync, not Send #20257

Closed
@pythonesque

Description

@pythonesque

The original justification for this was from issue #2788. I am pretty confident that this reasoning no longer applies, especially now that we have Sync. The reason this is safe is that Arc<T> will not be Send unless T is, and if you try to pass Arc<T> into spawn() without Send it won't work anyway.

(Making Arc<T> only Send sometimes may not have been doable prior to unsafe traits, so this issue may have depended on #20119 being resolved. But I think the way Arc is defined this isn't true).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-trait-systemArea: Trait systemT-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