How to achieve concurrency in SQLite database? As per documents it is possible using WAL(Write-Ahead Logging).But, I dont know how to implement it.
In my app I want to read data from db on main thread and at the same time a background thread is writing/inserting some data in the same table. On executing read and write query at same time app stops responding until insertion isn't done. Is concurrency possible in SQLite, and how?
To enable write-ahead logging, just call enableWriteAheadLogging() in the onConfigure() callback of your SQLiteOpenHelper-derived class.
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