Skip to main content

Module atomic

Module atomic 

Source
Expand description

Conditional atomic updates using the compare/exchange interface supported by the MSRV.

Functionsยง

try_update_i32
Return the previous value after a successful update, or the observed value when the callback returns None. The callback can run repeatedly after contention; the orderings apply to the successful exchange and failed reads respectively.
try_update_u64
Return the previous value after a successful update, or the observed value when the callback returns None. The callback can run repeatedly after contention; the orderings apply to the successful exchange and failed reads respectively.