Open slavat opened 9 years ago
I have a similar situation where I have some slowish insert transactions that happen on a background thread. I'm reading these entities into a lazy list and displaying them in a list view, but the list view is occasionally blocked as an insert transaction takes place in the background, momentarily locking read access in the UI.
Is there an ETA on this feature?
is anyone try to use this feature for non-exclusive transactions? will this work?
Non-exclusive transactions would be a big help here too. Thank you
I have quite long inserts inside transactions in my project (several seconds). SQLITE is blocked on read and write by default during transactions. So read requests are waiting for the DB while insert transactions are in progress.
Android has support for write-ahead logging and non-exclusive transactions since API 11. If you call SQLiteDatabase.enableWriteAheadLogging() and begin transactions with beginTransactionNonExclusive() you can execute reads while transactions are in progress.
It will be great to have support for non-exclusive transactions in AbstractDao and anywhere else if necessary.