Fixing core.atomic
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Wed Jun 2 14:59:34 UTC 2021
On Wednesday, 2 June 2021 at 14:08:32 UTC, rm wrote:
> It's useful if you want to implement known concurrency
> algorithms with SC semantics. Such as lamports lock (which
> requires SC).
Have you ever used Lamport's Bakery, though?
Atomic inc/dec are obviously useful, but usually you want to know
what the value was before/after the operation, so
fetch_add/compare_exchange are easier to deal with IMO.
More information about the Digitalmars-d
mailing list