arboretum-td 0.1.0

A library and CLI for obtaining exact and heuristc tree decompositions for arbitrary graphs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use core::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;

static SIGINT: AtomicBool = AtomicBool::new(false);

pub fn received_ctrl_c() -> bool {
    SIGINT.load(Ordering::SeqCst)
}

pub fn initialize() {
    ctrlc::set_handler(|| {
        SIGINT.store(true, Ordering::SeqCst);
    })
    .expect("Error setting Ctrl-C handler");
}