Crates.io | poee |
lib.rs | poee |
version | 0.1.0 |
source | src |
created_at | 2023-05-29 15:27:12.098216 |
updated_at | 2023-05-29 15:27:12.098216 |
description | Functions for efficient development |
homepage | |
repository | https://gitlab.com/andrew_ryan/poee |
max_upload_size | |
id | 877196 |
size | 6,079 |
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
poee::spawn(||{
std::fs::write("demo0", "rust").unwrap();
});
fn demo(){
std::fs::write("demo1", "rust").unwrap();
}
poee::spawn(demo);
Ok(())
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
poee::spawn_blocking(||{
std::fs::write("demo0", "rust").unwrap();
});
fn demo(){
std::fs::write("demo1", "rust").unwrap();
}
poee::spawn_blocking(demo);
Ok(())
}
fn main(){
async fn demo(){
println!("demo");
}
poee::sync_fn(demo());
}