Divide lib a little more

This commit is contained in:
Ethan O'Brien
2025-11-30 10:19:22 -06:00
parent 99da87095b
commit b9b344b50c
3 changed files with 60 additions and 59 deletions

17
src/runtime.rs Normal file
View File

@@ -0,0 +1,17 @@
use crate::lock_onto_mutex;
use lazy_static::lazy_static;
use std::sync::Mutex;
lazy_static! {
static ref RUNNING: Mutex<bool> = Mutex::new(false);
}
pub fn set_running(running: bool) {
let mut result = lock_onto_mutex!(RUNNING);
*result = running;
}
pub fn get_running() -> bool {
let result = lock_onto_mutex!(RUNNING);
*result
}