1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#![doc = include_str!("../README.md")]

pub mod background;
pub mod collector;
pub mod lru;
pub mod monitor;
pub mod spin_lock;
pub mod state_hash_table;
pub mod wait_list;
pub mod work_coalescing_queue;

///////////////////////////////////////////// Constants ////////////////////////////////////////////

/// The maximum concurrency expected by any type in `sync42`.  Performance is allowed to degrade if
/// there are more than this many concurrent threads accessing a structure.
pub const MAX_CONCURRENCY: usize = 1 << 22;

//////////////////////////////////////////// biometrics ////////////////////////////////////////////

/// Register all biometrics for the crate.
pub fn register_biometrics(collector: &biometrics::Collector) {
    state_hash_table::register_biometrics(collector);
    wait_list::register_biometrics(collector);
    work_coalescing_queue::register_biometrics(collector);
}