-
Enhancement
-
Resolution: Done
-
Minor
-
None
-
None
-
False
-
None
-
False
Some use cases may be complex and easier to implement using an "update function" than the traditional "compare-and-set loop" (like implementing limits to counter's value).
I'm proposing the following: update(CounterFunction<T> updateFunction).
The function is able to read and modify the counter's value and it is allowed to return a custom object.
Both the function and the return value must implement Streamable.