Crate left_right_cell

source ·
Expand description

left-right-cell is a lockfree, eventually consistent cell created using the left-right crate. It allows readers to read from the cell without ever blocking while the writer might block when writing. This is achived by storing to copies of the data one for the readers and one for the writer.


  • A reference guard to the read half of the cell. WriteHandle::publish will block until this is dropped.
  • A handle to the read half of the cell. Getting a value from the read handle will never block.
  • A handle to the write half of the cell. When this handle is dropped the backing data is also dropped.


  • Creates a new left-right-cell and returns the read and write handle.