mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
threadpool: update to std::future (#1219)
An initial pass at updating `tokio-threadpool` to `std::future`. The codebase and tests both now run using `std::future` but the wake mechanism is not ideal. Follow up work will be required to improve on this. Refs: #1200
This commit is contained in:
@@ -131,21 +131,30 @@
|
||||
|
||||
pub mod park;
|
||||
|
||||
macro_rules! ready {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
::std::task::Poll::Ready(t) => t,
|
||||
::std::task::Poll::Pending => return ::std::task::Poll::Pending,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
mod blocking;
|
||||
mod builder;
|
||||
mod callback;
|
||||
mod config;
|
||||
mod notifier;
|
||||
mod pool;
|
||||
mod sender;
|
||||
mod shutdown;
|
||||
mod task;
|
||||
mod thread_pool;
|
||||
mod waker;
|
||||
mod worker;
|
||||
|
||||
pub use crate::blocking::{blocking, BlockingError};
|
||||
pub use crate::builder::Builder;
|
||||
pub use crate::sender::Sender;
|
||||
pub use crate::shutdown::Shutdown;
|
||||
pub use crate::thread_pool::{SpawnHandle, ThreadPool};
|
||||
pub use crate::thread_pool::ThreadPool;
|
||||
pub use crate::worker::{Worker, WorkerId};
|
||||
|
||||
Reference in New Issue
Block a user