Skip to content

Commit

Permalink
More proeminent warning in Arc::{strong,weak}_count docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Nov 8, 2016
1 parent 38a959a commit 9357153
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,14 @@ impl<T: ?Sized> Arc<T> {

/// Gets the number of [`Weak`][weak] pointers to this value.
///
/// Be careful how you use this information, because another thread
/// may change the weak count at any time.
///
/// [weak]: struct.Weak.html
///
/// # Safety
///
/// This method by itself is safe, but using it correctly requires extra care.
/// Another thread can change the weak count at any time,
/// including potentially between calling this method and acting on the result.
///
/// # Examples
///
/// ```
Expand All @@ -347,8 +350,11 @@ impl<T: ?Sized> Arc<T> {

/// Gets the number of strong (`Arc`) pointers to this value.
///
/// Be careful how you use this information, because another thread
/// may change the strong count at any time.
/// # Safety
///
/// This method by itself is safe, but using it correctly requires extra care.
/// Another thread can change the strong count at any time,
/// including potentially between calling this method and acting on the result.
///
/// # Examples
///
Expand Down

0 comments on commit 9357153

Please sign in to comment.