Crate simple_left_right

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§

ReadGuard
Data won’t change while holding the Guard. This also means the Writer can only issue one swap, while Guard is being held If T: !Sync this is guaranteed to be the only ref to this T
Reader
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
WriteGuard
Can be used to write to the Data structure.
Writer
Not realtime safe object which can change the internal T value.

Traits§

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