Crate simple_left_right

source ·
Expand description

Simpler version of the left-right from Jon Gjengset library.

Uses two copies of the value to allow doing small changes, while still allowing non-blocking reading. Writing can block, while reading doesn’t.

Structs§

  • Data won’t change while holding the Guard. This also means the Writer can only issue one swap, while Guard is being held
  • Dropping the Reader isn’t realtime safe, because if dropped after the Writer, it deallocates. Should only get dropped, when closing the real-time thread
  • Can be used to write to the Data structure.
  • Not realtime safe Object which can change the internal T value

Traits§

  • Should be implemented on structs that want to be shared with this library