| Crates.io | shutdown_signal |
| lib.rs | shutdown_signal |
| version | 0.1.0 |
| created_at | 2025-10-08 19:23:50.053758+00 |
| updated_at | 2025-10-08 19:23:50.053758+00 |
| description | A library for catching shutdown signals within select with multiple tasks in rust async tokio |
| homepage | |
| repository | https://github.com/sssemil/shutdown_signal |
| max_upload_size | |
| id | 1874482 |
| size | 12,055 |
A library for catching shutdown signals within select with multiple tasks in rust async tokio
Example:
let shutdown = shutdown_signal();
tokio::pin!(shutdown);
loop {
select! {
biased;
reason = &mut shutdown => {
println!("Received shutdown signal: {:?}", reason);
break;
}
}
}