forked from robertohuertasm/SQLite4Unity3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current version of sqlite.so(~3.8.5) it seems that it needs to lock entire a database file during SQL access. - not only row nor table but a file - not only INSERT, UPDATE but also SELECT Without lock, app will have either: - database file disruption - BUSY exception with much time overhead To ensure that, I put logic around SQL execution to lock entire file automatically. And to prepend deadlock I added more: - RunInTransaction(Action) locks the database during the transaction (for insert/update) - RunInDatabaseLock(Action) similarly locks the database but no transaction (for query)
- Loading branch information
Showing
1 changed file
with
93 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters