From 272e09d349b00e36303c12ed5ce9ba77ad2c4720 Mon Sep 17 00:00:00 2001 From: Felix Obenhuber Date: Wed, 21 Nov 2018 23:23:36 +0100 Subject: [PATCH] threadpool: remove smoke example (#764) (#770) --- tokio-threadpool/Cargo.toml | 1 - tokio-threadpool/examples/smoke.rs | 34 ------------------------------ 2 files changed, 35 deletions(-) delete mode 100644 tokio-threadpool/examples/smoke.rs diff --git a/tokio-threadpool/Cargo.toml b/tokio-threadpool/Cargo.toml index b9fe99f17..426681a85 100644 --- a/tokio-threadpool/Cargo.toml +++ b/tokio-threadpool/Cargo.toml @@ -27,7 +27,6 @@ rand = "0.6" log = "0.4" [dev-dependencies] -tokio-timer = "0.1" env_logger = "0.5" # For comparison benchmarks diff --git a/tokio-threadpool/examples/smoke.rs b/tokio-threadpool/examples/smoke.rs deleted file mode 100644 index 8ab144917..000000000 --- a/tokio-threadpool/examples/smoke.rs +++ /dev/null @@ -1,34 +0,0 @@ -extern crate futures; -extern crate tokio_threadpool; -extern crate tokio_timer; -extern crate env_logger; - -use tokio_threadpool::*; -use tokio_timer::Timer; - -use futures::*; -use futures::sync::oneshot::spawn; - -use std::thread; -use std::time::Duration; - -pub fn main() { - let _ = ::env_logger::init(); - - let timer = Timer::default(); - { - let pool = ThreadPool::new(); - let tx = pool.sender().clone(); - - let fut = timer.interval(Duration::from_millis(300)) - .for_each(|_| { - println!("~~~~~ Hello ~~~"); - Ok(()) - }) - .map_err(|_| unimplemented!()); - - spawn(fut, &tx).wait().unwrap(); - } - - thread::sleep(Duration::from_millis(100)); -}