[Issue 20122] New: core.atomic.cas discards result on failure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 12 02:58:44 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20122
Issue ID: 20122
Summary: core.atomic.cas discards result on failure
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
The implementation of `cas` discards the result when the compare fails.
This is a strange choice, and not desirable.
There needs to be additional overloads that actually return the result.
--
More information about the Digitalmars-d-bugs
mailing list