Parallelizing Enjarify in Go and Rust
medium.com3 pointsby killercup1 comments
smol::block_on(async {
println!("I'm async!");
});
(I thought tokio had a helper like this too but could only find `tokio::runtime::Runtime::new().unwrap().block_on(async { println!("I'm async!"); });`.) #[get("/resource1/{name}/index.html")]
fn index(req: HttpRequest, name: web::Path<String>) -> String {
println!("REQ: {:?}", req);
format!("Hello: {}!\r\n", name)
}
see https://github.com/actix/actix-web/blob/e399e01a22b8a848ecbb...