An atomic class that guarantees atomic updates to its contained value.
Atomically sets the value to the given value if the current value is equal to the expected value.
Parameters: |
|
---|
Atomically sets to the given value and returns the old value
Parameters: | new_value – the new value |
---|
Update value based on the given function.
If the value changes before the update can happen, it will raise a ConcurrentUpdateException.
Parameters: | update_func (func) – a function that given the current value return the new value |
---|---|
Raises : | ConcurrentUpdateException |
Update value based on the given function.
It may run the block repeatedly if there are other concurrent updates in progress.
Parameters: | update_func (func) – a function that given the current value return the new value |
---|
Get and set current value