-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use thread-safe connection #37
Comments
The rest of the data structures would have to be Sync too, yes? I wonder if I'll find time to think this thru... |
Seems problematic. SQLite's thread safety supports three modes. The Really Thread Safe mode (serialized) is often the default, but not always. This depends on how the library was compiled. And it is also possible to compile SQLite with this mode omitted from the build. So if rust-sqlite3 is dynamically loading the sqlite3 library from "wherever", and I assume it is but have not checked, it cannot know how the library was compiled. |
Actually, it could check with sqlite3_threadsafe. |
Only the data structures used by So, the first candidate is |
This is now Somebody Else's Problem :) |
It is possible to have thread-safe sqlite3 connection handles, at which point DatabaseConnection could implement Sync and be shared between threads.
The text was updated successfully, but these errors were encountered: