wal-db 1.0.0

Write-ahead log primitive for Rust storage engines. Durable, recoverable, lock-free append path. The WAL substrate under lsm-db, txn-db, raft-io, and Hive DB.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Selection of synchronization primitives.
//!
//! Under `--cfg loom` the concurrency primitives come from `loom`, whose model
//! checker explores every meaningful thread interleaving; otherwise they are the
//! standard-library types. The rest of the crate names them only through here,
//! so the same append and commit logic is what loom verifies and what ships.

#[cfg(loom)]
pub(crate) use loom::sync::atomic::AtomicU64;
#[cfg(loom)]
pub(crate) use loom::sync::{Condvar, Mutex, MutexGuard};
#[cfg(not(loom))]
pub(crate) use std::sync::atomic::AtomicU64;
#[cfg(not(loom))]
pub(crate) use std::sync::{Condvar, Mutex, MutexGuard};