Update tokio-trace-core to 0.2 (#1111)

Also includes 1b498e8aa2
This commit is contained in:
Lucio Franco
2019-05-30 11:33:55 -07:00
committed by Carl Lerche
parent 475dabe96d
commit 940f2c3431
4 changed files with 10 additions and 3 deletions
+3
View File
@@ -8,6 +8,9 @@ jobs:
parameters:
rust_version: stable
- script: sudo apt-get update
displayName: "apt-get update"
- script: sudo apt-get install gcc-multilib
displayName: "Install gcc-multilib"
+1
View File
@@ -29,4 +29,5 @@ futures = "0.1.19"
[dev-dependencies]
env_logger = { version = "0.5", default-features = false }
net2 = "0.2"
tokio = "0.1.13"
+5 -2
View File
@@ -1,6 +1,7 @@
extern crate env_logger;
extern crate futures;
extern crate mio;
extern crate net2;
extern crate tokio_io;
extern crate tokio_tcp;
@@ -84,13 +85,14 @@ fn accept2() {
t.join().unwrap();
}
#[cfg(unix)]
mod unix {
#[cfg(target_os = "linux")]
mod linux {
use tokio_tcp::TcpStream;
use env_logger;
use futures::{future, Future};
use mio::unix::UnixReady;
use net2::TcpStreamExt;
use tokio_io::AsyncRead;
use std::io::Write;
@@ -105,6 +107,7 @@ mod unix {
let addr = t!(srv.local_addr());
let t = thread::spawn(move || {
let mut client = t!(srv.accept()).0;
client.set_linger(Some(Duration::from_millis(0))).unwrap();
client.write(b"hello world").unwrap();
thread::sleep(Duration::from_millis(200));
});
+1 -1
View File
@@ -73,7 +73,7 @@ tokio-threadpool = { version = "0.1.14", optional = true }
tokio-tcp = { version = "0.1.0", optional = true }
tokio-udp = { version = "0.1.0", optional = true }
tokio-timer = { version = "0.2.8", optional = true }
tokio-trace-core = { version = "0.1", optional = true }
tokio-trace-core = { version = "0.2", optional = true }
# Needed until `reactor` is removed from `tokio`.
mio = { version = "0.6.14", optional = true }