diff options
Diffstat (limited to 'tokio/src/runtime/threadpool/task_executor.rs')
-rw-r--r-- | tokio/src/runtime/threadpool/task_executor.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tokio/src/runtime/threadpool/task_executor.rs b/tokio/src/runtime/threadpool/task_executor.rs index f4dfce6b..9dee3fcb 100644 --- a/tokio/src/runtime/threadpool/task_executor.rs +++ b/tokio/src/runtime/threadpool/task_executor.rs @@ -28,8 +28,9 @@ impl TaskExecutor { /// /// # Examples /// - /// ```rust - /// # use futures::{future, Future, Stream}; + /// ``` + /// #![feature(async_await)] + /// /// use tokio::runtime::Runtime; /// /// # fn dox() { @@ -38,12 +39,10 @@ impl TaskExecutor { /// let executor = rt.executor(); /// /// // Spawn a future onto the runtime - /// executor.spawn(future::lazy(|| { + /// executor.spawn(async { /// println!("now running on a worker thread"); - /// Ok(()) - /// })); + /// }); /// # } - /// # pub fn main() {} /// ``` /// /// # Panics |