mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
Update Tokio to Rust 2018 (#1082)
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
use builder::Builder;
|
||||
use pool::Pool;
|
||||
use sender::Sender;
|
||||
use shutdown::{Shutdown, ShutdownTrigger};
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::pool::Pool;
|
||||
use crate::sender::Sender;
|
||||
use crate::shutdown::{Shutdown, ShutdownTrigger};
|
||||
use futures::sync::oneshot;
|
||||
use futures::{Future, Poll};
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Work-stealing based thread pool for executing futures.
|
||||
@@ -53,12 +51,9 @@ impl ThreadPool {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate tokio_threadpool;
|
||||
/// # extern crate futures;
|
||||
/// # use tokio_threadpool::ThreadPool;
|
||||
/// use futures::future::{Future, lazy};
|
||||
///
|
||||
/// # pub fn main() {
|
||||
/// // Create a thread pool with default configuration values
|
||||
/// let thread_pool = ThreadPool::new();
|
||||
///
|
||||
@@ -69,7 +64,6 @@ impl ThreadPool {
|
||||
///
|
||||
/// // Gracefully shutdown the threadpool
|
||||
/// thread_pool.shutdown().wait().unwrap();
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
@@ -93,12 +87,9 @@ impl ThreadPool {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate tokio_threadpool;
|
||||
/// # extern crate futures;
|
||||
/// # use tokio_threadpool::ThreadPool;
|
||||
/// use futures::future::{Future, lazy};
|
||||
///
|
||||
/// # pub fn main() {
|
||||
/// // Create a thread pool with default configuration values
|
||||
/// let thread_pool = ThreadPool::new();
|
||||
///
|
||||
@@ -109,7 +100,6 @@ impl ThreadPool {
|
||||
///
|
||||
/// // Gracefully shutdown the threadpool
|
||||
/// thread_pool.shutdown().wait().unwrap();
|
||||
/// # }
|
||||
/// ```
|
||||
///
|
||||
/// # Panics
|
||||
|
||||
Reference in New Issue
Block a user