Issue #49 wontfix
Originally reported on Google Code with ID 49
http://www.sqlite.org/threadsafe.html Sqlite, by default, is compiled in "serialized mode". This means that sqlite connections can be used by multiple threads with no restrictions. I would like to get some discussion going to determine if it makes sense for this light SQLite wrapper to have similar multithreading capabilities. Currently, SqliteConnection will ensure that all SQL that is executed will execute on the same thread that the connection was opened with. This doesn't seem necessary. Are these protections left over from previous versions of SQLite that were not threadsafe? What dangers and pitfalls are there for allowing an SqliteConnection to be used by multiple threads, besides proper locking and maintenance of the state inside of the java object SqliteConnection? I realize that there is already an SqliteQueue and SqliteJob class that helps users dedicate a thread to sqlite and queue jobs on it, but this is not always desired or convenient.
brainn on 2012-10-25 16:48:43