atomic-lend-cell 0.1.0

A Rust library for lending immutable references across threads with explicit owner-borrower semantics, offering both atomic reference counting and lightweight flag-based implementations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub mod atomic_counting;
pub mod flag_based;

// Export the implementation based on the selected feature
#[cfg(feature = "ref-counting")]
pub use atomic_counting::*;

#[cfg(feature = "flag-based")]
pub use flag_based::*;

// If neither feature is explicitly selected, use the default (flag-based)
#[cfg(all(not(feature = "ref-counting"), not(feature = "flag-based")))]
pub use flag_based::*;