westonpace commented on code in PR #7569:
URL: https://github.com/apache/arrow-rs/pull/7569#discussion_r2123775720


##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -125,6 +125,15 @@ impl Buffer {
         self.data.ptr()
     }
 
+    /// Returns the number of strong references to the buffer.
+    ///
+    /// This method is safe but if the buffer is shared across mulitple threads

Review Comment:
   I'm pretty sure even `into_inner` would have the potential race condition as 
this message was mostly just copying the warning from `Arc`'s 
[`strong_count`](https://doc.rust-lang.org/std/sync/struct.Arc.html#method.strong_count):
 
   
   > 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.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to