Skip to content

Instantly share code, notes, and snippets.

@justanotherdot
Last active September 20, 2020 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save justanotherdot/86ded184d8d7f5cd5ae0ac50ed58bfbc to your computer and use it in GitHub Desktop.
Save justanotherdot/86ded184d8d7f5cd5ae0ac50ed58bfbc to your computer and use it in GitHub Desktop.
// [package]
// name = "async-internal-spawn"
// version = "0.1.0"
// authors = ["Ryan James Spencer <spencer.ryanjames@gmail.com>"]
// 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