robertohuertasm / SQLite4Unity3d

SQLite made easy for Unity3d
MIT License
1.28k stars 265 forks source link

Added database file bases lock #31

Closed pokehanai closed 8 years ago

pokehanai commented 8 years ago

Current version of sqlite.so(~3.8.5) it seems that it needs to lock entire a database file during SQL access.

Without lock, app will have either:

To ensure that, I put logic around SQL execution to lock entire file automatically.

And to prepend deadlock I added more:

P.S. lock() should have overheads, IMHO, it's small. It depends on runtime environment; I tested on several gadgets and it was 300ns or so.

pokehanai commented 8 years ago

I tested sqlite 3.9.2 on Android, still it needs the db file base lock.

robertohuertasm commented 8 years ago

Thanks @pokehanai! :+1: