mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-11 00:00:16 +02:00
* 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
27 lines
515 B
Rust
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());
|
|
}
|