Skip to content

Current atomics are not defined to be lock-free #32967

Closed
@brson

Description

@brson

Right now we define things like AtomicPtr unconditionally. On platforms without real atomics these get lowered to locks today. People write lock-free algorithms with these atomics that are not actually guaranteed to be lock free.

For comparison, I'm told (by @sunfish) that C++ does try to guarantee that atomics are lock-free.

cc rust-lang/rfcs#1543

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamT-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