Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tokio/src/task/coop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
//! scheduling. When a future is wrapped with `unconstrained`, it will never be forced to yield to
//! Tokio. For example:
//!
//! ```
//! ```ignore-wasm
//! # #[tokio::main]
//! # async fn main() {
//! use tokio::{task, sync::mpsc};
Expand Down
10 changes: 5 additions & 5 deletions tokio/src/task/join_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::util::IdleNotifiedSet;
///
/// Spawn multiple tasks and wait for them.
///
/// ```
/// ```ignore-wasm
/// use tokio::task::JoinSet;
///
/// #[tokio::main]
Expand Down Expand Up @@ -208,7 +208,7 @@ impl<T: 'static> JoinSet<T> {
///
/// Spawn multiple blocking tasks and wait for them.
///
/// ```
/// ```ignore-wasm
/// use tokio::task::JoinSet;
///
/// #[tokio::main]
Expand Down Expand Up @@ -382,7 +382,7 @@ impl<T: 'static> JoinSet<T> {
///
/// Spawn multiple tasks and `join_all` them.
///
/// ```
/// ```ignore-wasm
/// use tokio::task::JoinSet;
/// use std::time::Duration;
///
Expand All @@ -404,7 +404,7 @@ impl<T: 'static> JoinSet<T> {
///
/// Equivalent implementation of `join_all`, using [`join_next`] and loop.
///
/// ```
/// ```ignore-wasm
/// use tokio::task::JoinSet;
/// use std::panic;
///
Expand Down Expand Up @@ -600,7 +600,7 @@ impl<T> Default for JoinSet<T> {
///
/// The main example from [`JoinSet`]'s documentation can also be written using [`collect`]:
///
/// ```
/// ```ignore-wasm
/// use tokio::task::JoinSet;
///
/// #[tokio::main]
Expand Down
16 changes: 8 additions & 8 deletions tokio/src/task/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cfg_rt! {
/// local task set, we can use [`task::spawn_local`], which can spawn
/// `!Send` futures. For example:
///
/// ```rust
/// ```rust,ignore-wasm
/// use std::rc::Rc;
/// use tokio::task;
///
Expand Down Expand Up @@ -94,7 +94,7 @@ cfg_rt! {
/// several futures on a `LocalSet` and drive the whole set until they
/// complete. For example,
///
/// ```rust
/// ```rust,ignore-wasm
/// use tokio::{task, time};
/// use std::rc::Rc;
///
Expand Down Expand Up @@ -132,7 +132,7 @@ cfg_rt! {
/// and communicate with it using an [`mpsc`] channel.
///
/// The following example puts the `LocalSet` inside a new thread.
/// ```
/// ```ignore-wasm
/// use tokio::runtime::Builder;
/// use tokio::sync::{mpsc, oneshot};
/// use tokio::task::LocalSet;
Expand Down Expand Up @@ -350,7 +350,7 @@ cfg_rt! {
///
/// # Examples
///
/// ```rust
/// ```rust,ignore-wasm
/// use std::rc::Rc;
/// use tokio::task;
///
Expand Down Expand Up @@ -540,7 +540,7 @@ impl LocalSet {
///
/// # Examples
///
/// ```rust
/// ```rust,ignore-wasm
/// use tokio::task;
///
/// #[tokio::main]
Expand Down Expand Up @@ -608,7 +608,7 @@ impl LocalSet {
/// issued from a local task, the [`spawn_blocking`] API may be used instead.
///
/// For example, this will panic:
/// ```should_panic
/// ```should_panic,ignore-wasm
/// use tokio::runtime::Runtime;
/// use tokio::task;
///
Expand All @@ -625,7 +625,7 @@ impl LocalSet {
/// })
/// ```
/// This, however, will not panic:
/// ```
/// ```ignore-wasm
/// use tokio::runtime::Runtime;
/// use tokio::task;
///
Expand Down Expand Up @@ -672,7 +672,7 @@ impl LocalSet {
///
/// # Examples
///
/// ```rust
/// ```rust,ignore-wasm
/// use tokio::task;
///
/// #[tokio::main]
Expand Down
8 changes: 4 additions & 4 deletions tokio/src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
//! A `JoinHandle` is itself a future which may be used to await the output of
//! the spawned task. For example:
//!
//! ```
//! ```ignore-wasm
//! use tokio::task;
//!
//! # #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand All @@ -89,7 +89,7 @@
//! task panics, awaiting its `JoinHandle` will return a [`JoinError`]. For
//! example:
//!
//! ```
//! ```ignore-wasm
//! use tokio::task;
//!
//! # #[tokio::main] async fn main() {
Expand Down Expand Up @@ -220,7 +220,7 @@
//!
//! For example:
//!
//! ```
//! ```ignore-wasm
//! use tokio::task;
//!
//! # async fn docs() {
Expand All @@ -242,7 +242,7 @@
//! scheduled. Eventually, the yielding task will be polled again, allowing it
//! to execute. For example:
//!
//! ```rust
//! ```rust,ignore-wasm
//! use tokio::task;
//!
//! # #[tokio::main] async fn main() {
Expand Down
4 changes: 2 additions & 2 deletions tokio/src/task/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cfg_rt! {
/// In this example, a server is started and `spawn` is used to start a new task
/// that processes each received connection.
///
/// ```no_run
/// ```no_run,ignore-wasm
/// use tokio::net::{TcpListener, TcpStream};
///
/// use std::io;
Expand Down Expand Up @@ -102,7 +102,7 @@ cfg_rt! {
///
/// For example, this will work:
///
/// ```
/// ```ignore-wasm
/// use tokio::task;
///
/// use std::rc::Rc;
Expand Down
Loading