Module untokio::v1 [−][src]
tokio = “1”
● spawn, runtime, try_set_runtime, set_runtime
Example
mod library { pub async fn read() -> Result<String, std::io::Error> { untokio::v1::spawn(async{ tokio1::fs::read_to_string("Cargo.toml").await }).await.unwrap() } } println!("{}", futures::executor::block_on(library::read()).unwrap());
Functions
runtime | Get untokio’s Runtime |
set_runtime | Provide a Runtime instead of letting untokio create its own. |
spawn | Spawns a new asynchronous task, returning a JoinHandle for it. |
try_set_runtime | Provide a Runtime instead of letting untokio create its own. |