mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -25,6 +25,7 @@ publish = false
|
||||
[dependencies]
|
||||
tokio-executor = { version = "0.2.0", path = "../tokio-executor" }
|
||||
tokio-sync = { version = "0.2.0", path = "../tokio-sync" }
|
||||
futures-core-preview = "0.3.0-alpha.17"
|
||||
|
||||
arc-waker = { git = "https://github.com/tokio-rs/async" }
|
||||
crossbeam-deque = "0.7.0"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::worker::Worker;
|
||||
|
||||
use futures_core::ready;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
use std::task::Poll;
|
||||
|
||||
@@ -131,15 +131,6 @@
|
||||
|
||||
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;
|
||||
|
||||
@@ -5,6 +5,7 @@ use tokio_test::*;
|
||||
use tokio_threadpool::*;
|
||||
|
||||
use async_util::future::poll_fn;
|
||||
use futures_core::ready;
|
||||
use rand::*;
|
||||
use std::sync::atomic::Ordering::*;
|
||||
use std::sync::atomic::*;
|
||||
@@ -13,15 +14,6 @@ use std::task::{Poll, Waker};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
macro_rules! ready {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
::std::task::Poll::Ready(t) => t,
|
||||
::std::task::Poll::Pending => return ::std::task::Poll::Pending,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn basic() {
|
||||
let _ = ::env_logger::try_init();
|
||||
|
||||
Reference in New Issue
Block a user