10 lines
286 B
Rust
10 lines
286 B
Rust
// src/macros.rs
|
|
#[macro_export]
|
|
macro_rules! check_shutdown {
|
|
($shutdown_flag:expr) => {
|
|
if $shutdown_flag.load(std::sync::atomic::Ordering::SeqCst) {
|
|
logger::log_warn("Shutdown detected, stopping processes").await;
|
|
return Ok(());
|
|
}
|
|
};
|
|
} |