vecdb 0.10.2

High-performance mutable persistent vectors built on rawdb
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{thread, time::Duration};
use vecdb::Exit;

fn main() {
    let exit = Exit::new();
    exit.register_cleanup(|| {
        eprintln!("[cleanup] flushing data...");
    });
    exit.set_ctrlc_handler();

    eprintln!("Running... press Ctrl+C to test signal handling");
    for i in 1.. {
        let _lock = exit.lock();
        eprintln!("  tick {i}");
        thread::sleep(Duration::from_secs(1));
    }
}