Current atomics are not defined to be lock-free #32967
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
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
The text was updated successfully, but these errors were encountered: