simple-left-right 0.2.3

Lockfree, realtime safe and copy-free Synchronisation
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented0 out of 14 items with examples
  • Size
  • Source code size: 1.03 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.93 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • luca3s

Simple left right

Simpler Version of left-right, which only allows one reader. Also allows real-time safe read operations and is designed for this use-case.

Testing

This library is tested both with miri and cargo-mutants. Some tests are disabled for miri as they leak memory or block on unlucky thread scheduling. They can be run by ignoring leaks or choosing a threading seed that doesn't lock itself.

cargo-mutants currently has one mutation that isn't caught by the tests, because it changes a bitwise operation to one that has the same result on the possible inputs. It also produces a couple of timeouts, as the write locking spins forever.

PRs should keep this state as much as possible.

std::mem::forget

Forgetting a Read/Write guard could lead to UB, so i detect that and panic if it happens. In order to make the detection cheap it doesn't differentiate between cases where a forget would lead to UB and cases where it doesn't. Just don't forget the guards and it won't panic.