felipecrv commented on issue #3454:
URL: https://github.com/apache/arrow-adbc/issues/3454#issuecomment-3319434142

   I think we should also consider that what is safe for other languages should 
also be safe for Rust. Unsound code is not acceptable in Go and C++ just 
because the compiler doesn't complain as much. We just have to enforce the 
guarantees manually.
   
   The calls that the Rust FFI makes should not be against `&mut` references if 
driver objects are expected to implement safe internal mutability. Just like I 
can acquire a lock from a const `&` in Rust and make `&mut` calls on the 
object, we should also be allowed to make FFI calls through `&` and expect the 
driver to manage the thread-safety on their side.
   
   We are just adding yet another layer of locking in Rust code on top of the 
one that should exist *in drivers* such that they work correctly in *non-Rust* 
applications.


-- 
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