tokio: update threaded runtime to std::future (#1280)

re-enables the threaded runtime and sets it (again) as the default.
This commit is contained in:
Carl Lerche
2019-07-10 11:21:06 -07:00
committed by GitHub
parent e5525628cd
commit bd3f3270db
20 changed files with 418 additions and 864 deletions
+4 -2
View File
@@ -13,7 +13,7 @@ use std::time::{Duration, Instant};
fn timer_with_threaded_runtime() {
use tokio::runtime::Runtime;
let mut rt = Runtime::new().unwrap();
let rt = Runtime::new().unwrap();
let (tx, rx) = mpsc::channel();
rt.spawn(async move {
@@ -25,7 +25,9 @@ fn timer_with_threaded_runtime() {
tx.send(()).unwrap();
});
rt.run().unwrap();
let mut e = tokio_executor::enter().unwrap();
e.block_on(rt.shutdown_on_idle());
rx.recv().unwrap();
}