refactor(workspace): enforce layered crate boundaries

This commit is contained in:
elky
2026-07-15 23:47:19 +08:00
parent a728c090a9
commit 8616fe6ee2
969 changed files with 40187 additions and 27240 deletions
@@ -0,0 +1,15 @@
#[cfg(unix)]
pub async fn wait_for_shutdown_signal() -> Result<(), std::io::Error> {
use tokio::signal::unix::{signal, SignalKind};
let mut terminate = signal(SignalKind::terminate())?;
tokio::select! {
_ = tokio::signal::ctrl_c() => Ok(()),
_ = terminate.recv() => Ok(()),
}
}
#[cfg(not(unix))]
pub async fn wait_for_shutdown_signal() -> Result<(), std::io::Error> {
tokio::signal::ctrl_c().await
}