seqlock icon indicating copy to clipboard operation
seqlock copied to clipboard

A reader-writer lock that provides extremely fast read access without starving writers

Results 5 seqlock issues
Sort by recently updated
recently updated
newest added

Hi, I'm learning concurrency programming these days, just curious to know if it is OK to use ptr::read() below: https://github.com/Amanieu/seqlock/blob/b72653fd9c38141da7e588a97a1b654239f5d4df/src/lib.rs#L136 when write operation finished, there is a `Release` ording here:...

Since the API hasn't changed much in ~5 years, could this crate be bumped to 1.0? Crates implementing concurrency primitives with version numbers < 1.0 look (justifiably) scary, which I...

https://github.com/rust-lang/rust/issues/58599 https://internals.rust-lang.org/t/expose-llvm-atomic-memcpy-in-intrinsics/9466/4 The `volatile_read` here is an questionable operation which depends on internal implementations to synchronize reads with the previous read-acquire on seqlock. Ref: #2

This PR removes dependence on another mutex, and instead use the `seq: AtomicUsize` variable in `Seqlock` as the mutex variable.

Would you be open to an MR adding a new method `read_with_seq` which returns the current value of seq (i.e. `seq1` which was loaded and compared with `seq2`)? I'd like...