@@ -1618,7 +1618,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
16181618 #[ must_use]
16191619 #[ stable( feature = "arc_counts" , since = "1.15.0" ) ]
16201620 pub fn weak_count ( this : & Self ) -> usize {
1621- let cnt = this. inner ( ) . weak . load ( Acquire ) ;
1621+ let cnt = this. inner ( ) . weak . load ( Relaxed ) ;
16221622 // If the weak count is currently locked, the value of the
16231623 // count was 0 just before taking the lock.
16241624 if cnt == usize:: MAX { 0 } else { cnt - 1 }
@@ -1648,7 +1648,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
16481648 #[ must_use]
16491649 #[ stable( feature = "arc_counts" , since = "1.15.0" ) ]
16501650 pub fn strong_count ( this : & Self ) -> usize {
1651- this. inner ( ) . strong . load ( Acquire )
1651+ this. inner ( ) . strong . load ( Relaxed )
16521652 }
16531653
16541654 /// Increments the strong reference count on the `Arc<T>` associated with the
@@ -2803,7 +2803,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
28032803 #[ must_use]
28042804 #[ stable( feature = "weak_counts" , since = "1.41.0" ) ]
28052805 pub fn strong_count ( & self ) -> usize {
2806- if let Some ( inner) = self . inner ( ) { inner. strong . load ( Acquire ) } else { 0 }
2806+ if let Some ( inner) = self . inner ( ) { inner. strong . load ( Relaxed ) } else { 0 }
28072807 }
28082808
28092809 /// Gets an approximation of the number of `Weak` pointers pointing to this
@@ -2822,7 +2822,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
28222822 pub fn weak_count ( & self ) -> usize {
28232823 if let Some ( inner) = self . inner ( ) {
28242824 let weak = inner. weak . load ( Acquire ) ;
2825- let strong = inner. strong . load ( Acquire ) ;
2825+ let strong = inner. strong . load ( Relaxed ) ;
28262826 if strong == 0 {
28272827 0
28282828 } else {
0 commit comments