http://www.sqlite.org/threadsafe.html
From above link I came to know, SQLite support three different threading modes : Single-thread,Multi-thread and Serialized. I am just curious to know "What is the Default Threading mode of SQLite in Android"? is there any way to change Threading mode pragmatically? If so, how and what are the advantages I get? When to choose which one with some sample cases?
Thanks In Advance.
Default Mode - Serialized
By default SqliteDatabase is Thread safe, you can check it on the Android Docs,
setLockingEnabled(boolean lockingEnabled)
From the Docs -
Control whether or not the SQLiteDatabase is made thread-safe by using locks around critical sections. This is pretty expensive, so if you know that your DB will only be used by a single thread then you should set this to false. The default is true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With