Files
tokio/tokio-threadpool/examples/hello.rs
T
Carl LercheandGitHub b2c777846e timer: finish updating timer (#1222)
* timer: restructure feature flags
* update timer tests
* Add `async-traits` to CI

This also disables a buggy `threadpool` test. This test should be fixed in the future.

Refs #1225
2019-06-30 08:48:53 -07:00

27 lines
515 B
Rust

#![cfg(features = "broken")]
extern crate env_logger;
extern crate futures;
extern crate tokio_threadpool;
use futures::sync::oneshot;
use futures::*;
use tokio_threadpool::*;
pub fn main() {
let _ = ::env_logger::init();
let pool = ThreadPool::new();
let tx = pool.sender().clone();
let res = oneshot::spawn(
future::lazy(|| {
println!("Running on the pool");
Ok::<_, ()>("complete")
}),
&tx,
);
println!("Result: {:?}", res.wait());
}