reload_self 0.1.26

Cross-platform process hot reload library / 跨平台进程热重载库
Documentation
1
2
3
4
5
6
7
8
9
use tokio::signal::unix::{SignalKind, signal};

/// Wait for SIGHUP signal / 等待 SIGHUP 信号
pub async fn wait_reload() {
  let mut stream = signal(SignalKind::hangup()).expect("Failed to create SIGHUP signal stream");
  stream.recv().await;
}