chio-bounded 0.1.2

Reusable bounded in-memory collections (ring, capacity-and-TTL map) with a live size gauge, for Chio serving processes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Atomic / Arc shim. Under `--cfg loom` these resolve to loom's models so the
//! concurrency test in `tests/loom_bounded_map.rs` can explore interleavings;
//! otherwise they are the std types with zero overhead.

#[cfg(loom)]
pub(crate) use loom::sync::atomic::{AtomicUsize, Ordering};
#[cfg(loom)]
pub(crate) use loom::sync::Arc;

#[cfg(not(loom))]
pub(crate) use std::sync::atomic::{AtomicUsize, Ordering};
#[cfg(not(loom))]
pub(crate) use std::sync::Arc;