Skip to content

Instantly share code, notes, and snippets.

@boxdot
Created February 18, 2019 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxdot/1c4373264ca29f824f44dcf1234cb7b7 to your computer and use it in GitHub Desktop.
Save boxdot/1c4373264ca29f824f44dcf1234cb7b7 to your computer and use it in GitHub Desktop.
fn some_test -> Result<(), Error> {
let mut rt = tokio::runtime::Runtime::new().unwrap();
rt.spawn(microservice_1.map_err(|e| panic!(e)));
rt.spawn(microservice_2.map_err(|e| panic!(e)));
rt.spawn(microservice_3.map_err(|e| panic!(e)));
rt.spawn(microservice_4.map_err(|e| panic!(e)));
// do testing and do not touch rt anymore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment