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
26
27
28
29
30
31
32
33
/*!

# On Disk Ringbuffer

This is an extremely simple implementation of an on disk write-only log that
sort of pretends to be a ringbuffer! It uses memory-mapped pages to have interprocess,
lock-free, reads and writes. It's blazingly fast, but tends to hog disk-space for better
efficiency (less but bigger memory-mapped pages).


## Example
```rust
fn seq_test() {
    // takes directory to use as ringbuf storage as input
    let (mut tx, mut rx) = new("test-seq").unwrap();

    // you can clone readers and writers to use in other threads!
    let tx2 = tx.clone();

    for i in 0..50_000_000 {
        tx.push(i.to_string());
    }

    for i in 0..50_000_000 {
        let m = rx.pop().unwrap().unwrap();
        assert_eq!(m, i.to_string());
    }
}
```
*/

pub mod page;
pub mod ringbuf;