Update futures-preview/tokio
This commit is contained in:
parent
1b5d65d462
commit
aa44090fad
@ -16,12 +16,12 @@ default = ["runtime"]
|
|||||||
runtime = ["tokio-postgres/runtime"]
|
runtime = ["tokio-postgres/runtime"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures-preview = "=0.3.0-alpha.17"
|
futures-preview = "=0.3.0-alpha.18"
|
||||||
native-tls = "0.2"
|
native-tls = "0.2"
|
||||||
tokio-io = "=0.2.0-alpha.1"
|
tokio-io = "=0.2.0-alpha.2"
|
||||||
tokio-tls = "=0.3.0-alpha.1"
|
tokio-tls = "=0.3.0-alpha.2"
|
||||||
tokio-postgres = { version = "0.4.0-rc.1", path = "../tokio-postgres", default-features = false }
|
tokio-postgres = { version = "0.4.0-rc.1", path = "../tokio-postgres", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = "=0.2.0-alpha.1"
|
tokio = "=0.2.0-alpha.2"
|
||||||
postgres = { version = "0.16.0-rc.1", path = "../postgres" }
|
postgres = { version = "0.16.0-rc.1", path = "../postgres" }
|
||||||
|
@ -16,12 +16,12 @@ default = ["runtime"]
|
|||||||
runtime = ["tokio-postgres/runtime"]
|
runtime = ["tokio-postgres/runtime"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures-preview = "=0.3.0-alpha.17"
|
futures-preview = "=0.3.0-alpha.18"
|
||||||
openssl = "0.10"
|
openssl = "0.10"
|
||||||
tokio-io = "=0.2.0-alpha.1"
|
tokio-io = "=0.2.0-alpha.2"
|
||||||
tokio-openssl = "=0.4.0-alpha.1"
|
tokio-openssl = "=0.4.0-alpha.2"
|
||||||
tokio-postgres = { version = "0.4.0-rc.1", path = "../tokio-postgres", default-features = false }
|
tokio-postgres = { version = "0.4.0-rc.1", path = "../tokio-postgres", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = "=0.2.0-alpha.1"
|
tokio = "=0.2.0-alpha.2"
|
||||||
postgres = { version = "0.16.0-rc.1", path = "../postgres" }
|
postgres = { version = "0.16.0-rc.1", path = "../postgres" }
|
||||||
|
@ -30,14 +30,14 @@ runtime = ["tokio-postgres/runtime", "tokio", "lazy_static", "log"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
fallible-iterator = "0.2"
|
fallible-iterator = "0.2"
|
||||||
futures-preview = "=0.3.0-alpha.17"
|
futures-preview = "=0.3.0-alpha.18"
|
||||||
pin-utils = "=0.1.0-alpha.4"
|
pin-utils = "=0.1.0-alpha.4"
|
||||||
tokio-postgres = { version = "0.4.0-rc.2", path = "../tokio-postgres", default-features = false }
|
tokio-postgres = { version = "0.4.0-rc.2", path = "../tokio-postgres", default-features = false }
|
||||||
tokio-executor = "=0.2.0-alpha.1"
|
tokio-executor = "=0.2.0-alpha.2"
|
||||||
|
|
||||||
tokio = { version = "=0.2.0-alpha.1", optional = true }
|
tokio = { version = "=0.2.0-alpha.2", optional = true }
|
||||||
lazy_static = { version = "1.0", optional = true }
|
lazy_static = { version = "1.0", optional = true }
|
||||||
log = { version = "0.4", optional = true }
|
log = { version = "0.4", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = "=0.2.0-alpha.1"
|
tokio = "=0.2.0-alpha.2"
|
||||||
|
@ -21,7 +21,7 @@ circle-ci = { repository = "sfackler/rust-postgres" }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["runtime"]
|
default = ["runtime"]
|
||||||
runtime = ["tokio/rt-full", "tokio/tcp", "tokio/uds", "tokio-threadpool", "lazy_static"]
|
runtime = ["tokio/rt-full", "tokio/tcp", "tokio/uds", "tokio-executor", "lazy_static"]
|
||||||
|
|
||||||
"with-bit-vec-0_5" = ["bit-vec-05"]
|
"with-bit-vec-0_5" = ["bit-vec-05"]
|
||||||
"with-chrono-0_4" = ["chrono-04"]
|
"with-chrono-0_4" = ["chrono-04"]
|
||||||
@ -33,16 +33,16 @@ with-serde_json-1 = ["serde-1", "serde_json-1"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
fallible-iterator = "0.2"
|
fallible-iterator = "0.2"
|
||||||
futures-preview = { version = "=0.3.0-alpha.17", features = ["nightly", "async-await"] }
|
futures-preview = { version = "=0.3.0-alpha.18", features = ["nightly", "async-await"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
parking_lot = "0.9"
|
parking_lot = "0.9"
|
||||||
percent-encoding = "1.0"
|
percent-encoding = "1.0"
|
||||||
pin-utils = "=0.1.0-alpha.4"
|
pin-utils = "=0.1.0-alpha.4"
|
||||||
phf = "0.7.23"
|
phf = "0.7.23"
|
||||||
postgres-protocol = { version = "0.4.1", path = "../postgres-protocol" }
|
postgres-protocol = { version = "0.4.1", path = "../postgres-protocol" }
|
||||||
tokio = { version = "=0.2.0-alpha.1", default-features = false, features = ["io", "codec"] }
|
tokio = { version = "=0.2.0-alpha.2", default-features = false, features = ["io", "codec"] }
|
||||||
|
|
||||||
tokio-threadpool = { version = "=0.2.0-alpha.1", optional = true }
|
tokio-executor = { version = "=0.2.0-alpha.2", optional = true }
|
||||||
lazy_static = { version = "1.0", optional = true }
|
lazy_static = { version = "1.0", optional = true }
|
||||||
|
|
||||||
bit-vec-05 = { version = "0.5", package = "bit-vec", optional = true }
|
bit-vec-05 = { version = "0.5", package = "bit-vec", optional = true }
|
||||||
@ -54,5 +54,5 @@ serde_json-1 = { version = "1.0", package = "serde_json", optional = true }
|
|||||||
uuid-07 = { version = "0.7", package = "uuid", optional = true }
|
uuid-07 = { version = "0.7", package = "uuid", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = "=0.2.0-alpha.1"
|
tokio = "=0.2.0-alpha.2"
|
||||||
env_logger = "0.5"
|
env_logger = "0.5"
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
use crate::config::Host;
|
use crate::config::Host;
|
||||||
use crate::{Error, Socket};
|
use crate::{Error, Socket};
|
||||||
use std::vec;
|
|
||||||
use futures::channel::oneshot;
|
use futures::channel::oneshot;
|
||||||
use futures::future;
|
use futures::future;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::net::{IpAddr, SocketAddr, ToSocketAddrs};
|
use std::net::{IpAddr, SocketAddr, ToSocketAddrs};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
use std::vec;
|
||||||
use std::{io, thread};
|
use std::{io, thread};
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use tokio::net::UnixStream;
|
use tokio::net::UnixStream;
|
||||||
use tokio::timer::Timeout;
|
use tokio::timer::Timeout;
|
||||||
|
use tokio_executor::threadpool;
|
||||||
|
|
||||||
pub(crate) async fn connect_socket(
|
pub(crate) async fn connect_socket(
|
||||||
host: &Host,
|
host: &Host,
|
||||||
@ -67,7 +68,7 @@ pub(crate) async fn connect_socket(
|
|||||||
async fn dns(host: &str, port: u16) -> io::Result<vec::IntoIter<SocketAddr>> {
|
async fn dns(host: &str, port: u16) -> io::Result<vec::IntoIter<SocketAddr>> {
|
||||||
// if we're running on a threadpool, use its blocking support
|
// if we're running on a threadpool, use its blocking support
|
||||||
if let Ok(r) =
|
if let Ok(r) =
|
||||||
future::poll_fn(|_| tokio_threadpool::blocking(|| (host, port).to_socket_addrs())).await
|
future::poll_fn(|_| threadpool::blocking(|| (host, port).to_socket_addrs())).await
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user