Sqlite3 Concurrency Issue in IOS -
i using sqlite 3 in ios application. requires lots of read/write operation , many of them attempted concurrently. of these functions running in separate threads, accessing same database.
here few methods have thought of:
at every database access ( read/write ) put flag
database_open=yes, , if found true retry again in few seconds. can put function @ database layer itself.run database operations in same thread. however, use case such need wait http calls finish , store retreived data sqlite. method, have make these server calls synchronous. not best idea.
please suggest if thinking in wrong direction.
sqlite supports concurrent access multiple threads. configure sqlite_config_multithread mode, , separately open database each of threads.
Comments
Post a Comment