| Crates.io | block_until_sigint |
| lib.rs | block_until_sigint |
| version | 0.1.0 |
| created_at | 2022-04-29 06:55:19.19054+00 |
| updated_at | 2022-04-29 06:55:19.19054+00 |
| description | A simple easy to use wrapper around Ctrl-C signal. |
| homepage | https://github.com/pefish/rust-pefish-lib |
| repository | https://github.com/pefish/rust-pefish-lib |
| max_upload_size | |
| id | 577163 |
| size | 3,929 |
A simple easy to use wrapper around Ctrl-C signal.
use anyhow::{Context, Result, Ok};
use block_until_sigint::block;
#[tokio::main]
async fn main() -> Result<()> {
block(async {
println!("Hello, world!");
}).await?;
Ok(())
}
git checkout -b my-new-feature)git add .)git commit -m 'Add some feature')git push origin my-new-feature)If you discover a security vulnerability, please send an e-mail to pefish@qq.com. All security vulnerabilities will be promptly addressed.
This project is licensed under the Apache License.