Last active
September 20, 2020 22:03
-
-
Save justanotherdot/86ded184d8d7f5cd5ae0ac50ed58bfbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [package] | |
// name = "async-internal-spawn" | |
// version = "0.1.0" | |
// authors = ["Ryan James Spencer <[email protected]>"] | |
// edition = "2018" | |
// [dependencies.async-std] | |
// version = '1.6.2' | |
// features = ['unstable'] | |
use async_std::task; | |
fn main() { | |
task::block_on(task::spawn(async move { | |
println!("outer"); | |
task::spawn(async move { | |
println!("inner"); | |
}); | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment