mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
Track futures tokio-reform branch (#88)
This patch also updates tests and examples to remove deprecated API usage.
This commit is contained in:
@@ -18,7 +18,7 @@ extern crate tokio_io;
|
||||
use std::{env, io};
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use futures::{Future, Poll};
|
||||
use futures::{future, Future, Poll};
|
||||
use tokio::net::UdpSocket;
|
||||
|
||||
struct Server {
|
||||
@@ -58,9 +58,9 @@ fn main() {
|
||||
|
||||
// Next we'll create a future to spawn (the one we defined above) and then
|
||||
// we'll block our current thread waiting on the result of the future
|
||||
Server {
|
||||
future::blocking(Server {
|
||||
socket: socket,
|
||||
buf: vec![0; 1024],
|
||||
to_send: None,
|
||||
}.wait().unwrap();
|
||||
}).wait().unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user