Expand description
Lightweight compare-and-swap primitives for u64 state words.
CasCell owns an atomic state word and retries functional updates until
they commit or return a business error. FastCas adds bounded conflict
policies and attempt metadata for callers that need explicit control.
Update closures may execute repeatedly after conflicts and should avoid non-idempotent side effects.
Structs§
- CasCell
- An atomic
u64cell with reusable compare-and-swap update loops. - FastCas
- Policy-driven compare-and-swap executor for
u64state codes. - Fast
CasSuccess - Successful
crate::FastCasresult carrying its state transition and output.
Enums§
- Fast
CasDecision - Decision returned by one
crate::FastCasoperation attempt. - Fast
CasError - Terminal
crate::FastCasfailure. - Fast
CasPolicy - Controls how
crate::FastCasresponds when compare-and-swap loses a race.
Type Aliases§
- Fast
CasState - Shared atomic state used by
crate::FastCas.