ref-swap 0.1.0

Safe wrapper around AtomicPtr
Documentation

Safe wrapper around AtomicPtr. Instead of swapping a pointer, it works with references and lifetimes, allowing a safe API.

Two versions are provided:

  • [RefSwap][] for swapping references
  • [OptionRefSwap][] for swapping Option<&T>

[OptionRefSwap][] encodes None as a null pointer and has no additionnal overhead.