www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20122] New: core.atomic.cas discards result on failure

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 puremagic.com
          Reporter: turkeyman 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.

--
Aug 11 2019