-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send+Sync for connection #131
Comments
Hello, thanks for your question. This needs more deep investigation because it's highly dependent on ODBC driver manager and driver itself whether it's safe to use things concurrently or not. r2d2-odbc is hacky quick'n'dirty implementation, but in this crate we try to do things more safely |
Just a quick comment from the sideline: In general it is unsafe, because it depends on your ODBC configuration wether this is safe or not. I'd suggest to promote a connection without I think the relevant configuration to look at wether this is actually safe, is the threading level. See: Threading=2 should be fine. |
I'm also interested in this. I would love to be able to use this crate with deadpool: I wouldn't mind using bb8 too. |
Would gladly merge PR implementing the @pacman82 idea. |
Looking at the docs it says that
Send
andSync
are not implemented for connection but in your r2d2-odbc crate it is "unsafely" implemented. Can they be implemented in this crate? Or do you allow it under r2d2 because it takes care not to share a connection amongst two threads?The text was updated successfully, but these errors were encountered: