Thanks to visit codestin.com
Credit goes to github.com

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
8 changes: 6 additions & 2 deletions src/sync/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use crate::sync::Mutex;
/// ```
/// # async_std::task::block_on(async {
/// #
/// use async_std::sync::{Arc, Barrier};
/// use std::sync::Arc;
///
/// use async_std::sync::Barrier;
/// use async_std::task;
///
/// let mut handles = Vec::with_capacity(10);
Expand Down Expand Up @@ -121,7 +123,9 @@ impl Barrier {
/// ```
/// # async_std::task::block_on(async {
/// #
/// use async_std::sync::{Arc, Barrier};
/// use std::sync::Arc;
///
/// use async_std::sync::Barrier;
/// use async_std::task;
///
/// let mut handles = Vec::with_capacity(10);
Expand Down
7 changes: 2 additions & 5 deletions src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@
//! The following is an overview of the available synchronization
//! objects:
//!
//! - [`Arc`]: Atomically Reference-Counted pointer, which can be used
//! in multithreaded environments to prolong the lifetime of some
//! data until all the threads have finished using it.
//!
//! - [`Barrier`]: Ensures multiple threads will wait for each other
//! to reach a point in the program, before continuing execution all
//! together.
Expand All @@ -142,7 +138,6 @@
//! writer at a time. In some cases, this can be more efficient than
//! a mutex.
//!
//! [`Arc`]: crate::sync::Arc
//! [`Barrier`]: crate::sync::Barrier
//! [`Condvar`]: crate::sync::Condvar
//! [`channel`]: fn.channel.html
Expand Down Expand Up @@ -175,6 +170,8 @@
//! # })
//! ```

#[cfg(feature = "unstable")]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[doc(inline)]
pub use std::sync::{Arc, Weak};

Expand Down