-
Enhancement
-
Resolution: Fixed
-
P4
-
15
-
b08
There are a number of places where we have this pattern:
int result = Atomic::add(_index, amount) - amount;
I'd like to introduce Atomic::fetch_and_add so that we can write:
int result = Atomic::fetch_and_add(_index, amount);
The current implementation already has support for both "add and fetch" and "fetch and add" but it's not exposed to the upper layers.
int result = Atomic::add(_index, amount) - amount;
I'd like to introduce Atomic::fetch_and_add so that we can write:
int result = Atomic::fetch_and_add(_index, amount);
The current implementation already has support for both "add and fetch" and "fetch and add" but it's not exposed to the upper layers.