crossync 0.2.0

A fast concurrent programming suite for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub mod backoff;
pub(crate) mod coord;
pub(crate) mod serial;
pub(crate) mod futex;
pub(crate) mod mutex;
pub mod scondvar;
pub(crate) mod smutex;
pub(crate) mod thread;

/// Bound forgotten-clone counts before overflow can free live storage.
#[inline]
pub(crate) fn increment_ref_count(count: &std::sync::atomic::AtomicUsize) {
    if count.fetch_add(1, std::sync::atomic::Ordering::Relaxed) >= isize::MAX as usize {
        std::process::abort();
    }
}