simple-left-right

Crates.iosimple-left-right
lib.rssimple-left-right
version0.2.3
created_at2024-09-24 20:00:14.179438+00
updated_at2025-10-01 16:36:42.881322+00
descriptionLockfree, realtime safe and copy-free Synchronisation
homepage
repositoryhttps://tangled.sh/did:plc:54jgbo4psy24qu2bk4njtpc4/simple-left-right/
max_upload_size
id1385628
size1,032,483
increasing (inkreasing)

documentation

README

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.

Commit count: 0

cargo fmt