Rust版本: stable 1.39
[dependencies]
async-std = "*"
use async_std::{task, };
type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
async fn manager() -> Result<()> {
task::spawn(worker());
Ok(())
}
async fn worker() -> Result<()> {
Ok(())
}
fn main() {
task::block_on(manager());
}