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


##########
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 looked around and could not find any way to avoid the potential race 
condition. 
   
   The only thing I can think of is `into_inner()` that woudl return the inner 
`Arc<Bytes>` but confusingly I think the `Bytes` is an internal implementation 
detail that we shouldn't expose



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to