mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-28 15:19:41 +00:00
Use async_std::sync::Arc in examples (#501)
This commit is contained in:
parent
417b548692
commit
352f18bc2a
3 changed files with 5 additions and 14 deletions
|
@ -34,8 +34,7 @@ pin_project! {
|
|||
/// # async_std::task::block_on(async {
|
||||
/// #
|
||||
/// use async_std::prelude::*;
|
||||
/// use async_std::sync::Mutex;
|
||||
/// use std::sync::Arc;
|
||||
/// use async_std::sync::{Arc, Mutex};
|
||||
/// use async_std::stream;
|
||||
///
|
||||
/// let count = Arc::new(Mutex::new(0u8));
|
||||
|
|
|
@ -155,9 +155,7 @@
|
|||
//! ```
|
||||
//! # async_std::task::block_on(async {
|
||||
//! #
|
||||
//! use std::sync::Arc;
|
||||
//!
|
||||
//! use async_std::sync::Mutex;
|
||||
//! use async_std::sync::{Arc, Mutex};
|
||||
//! use async_std::task;
|
||||
//!
|
||||
//! let m1 = Arc::new(Mutex::new(0));
|
||||
|
|
|
@ -19,9 +19,7 @@ use crate::task::{Context, Poll};
|
|||
/// ```
|
||||
/// # async_std::task::block_on(async {
|
||||
/// #
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
/// use async_std::sync::Mutex;
|
||||
/// use async_std::sync::{Arc, Mutex};
|
||||
/// use async_std::task;
|
||||
///
|
||||
/// let m = Arc::new(Mutex::new(0));
|
||||
|
@ -77,9 +75,7 @@ impl<T> Mutex<T> {
|
|||
/// ```
|
||||
/// # async_std::task::block_on(async {
|
||||
/// #
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
/// use async_std::sync::Mutex;
|
||||
/// use async_std::sync::{Arc, Mutex};
|
||||
/// use async_std::task;
|
||||
///
|
||||
/// let m1 = Arc::new(Mutex::new(10));
|
||||
|
@ -155,9 +151,7 @@ impl<T> Mutex<T> {
|
|||
/// ```
|
||||
/// # async_std::task::block_on(async {
|
||||
/// #
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
/// use async_std::sync::Mutex;
|
||||
/// use async_std::sync::{Arc, Mutex};
|
||||
/// use async_std::task;
|
||||
///
|
||||
/// let m1 = Arc::new(Mutex::new(10));
|
||||
|
|
Loading…
Reference in a new issue