1
2
3
4
5
6
7
8
9
10
11
12
13
//! global atomic debug flag (for developer testing)

use crate::imports::*;

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

pub fn enable(debug: bool) {
    DEBUG.store(debug, Ordering::SeqCst);
}

pub fn debug() -> bool {
    DEBUG.load(Ordering::SeqCst)
}