felipecrv commented on issue #3454:
URL: https://github.com/apache/arrow-adbc/issues/3454#issuecomment-3368509414
> The current design is basically "Send, but not Sync;
And `Mutex<T>` is [drastic] way to turn a `T` that is `Send` into a `Sync`
[1]. @lidavidm, are you saying we should expose the non-Sync nature of the
object to the applications instead of trying to do the `Mutex`-wrapping in
`adbc_core` itself?
That's the closest to what the other languages are doing.
[1]
```rust
/// `T` must be `Send` for [`Mutex`] to be `Sync`.
/// This ensures that the protected data can be accessed safely from
multiple threads
/// without causing data races or other unsafe behavior.
///
/// ...
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Send> Sync for Mutex<T> {}
```
--
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]