Macros for efficient development

Crates.io Rust license

Examples

### Spawns a new asynchronous task, returning a JoinHandle for it. ```rust

[tokio::main]

async fn main() -> Result<(), Box> { poee::spawn(||{ std::fs::write("demo0", "rust").unwrap(); }); fn demo(){ std::fs::write("demo1", "rust").unwrap(); } poee::spawn(demo);

Ok(())

} ### Runs the provided closure on a thread where blocking is acceptable. rust

[tokio::main]

async fn main() -> Result<(), Box> { poee::spawnblocking(||{ std::fs::write("demo0", "rust").unwrap(); }); fn demo(){ std::fs::write("demo1", "rust").unwrap(); } poee::spawnblocking(demo);

Ok(())

}
### executed on the async code in sync rust fn main(){ async fn demo(){ println!("demo"); } poee::sync_fn(demo()); } ```