Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iOS threading model #240

Open
brody4hire opened this issue Apr 20, 2015 · 0 comments
Open

Fix iOS threading model #240

brody4hire opened this issue Apr 20, 2015 · 0 comments

Comments

@brody4hire
Copy link

The iOS version uses a thread pool to queue and handle SQL batch requests (backgroundExecuteSqlBatch: in SQLitePlugin.m). However, there is effectively only one thread working at a time since executeSql: in SQLitePlugin.m calls executeSqlWithDict:andArgs: in a @synchronized(self) block.

There are two possibilities:

  • run all SQL requests from the same thread and build sqlite.c with SQLITE_THREADSAFE=0 (this will work for Windows (8.1) version as well since it has no background threading right now)
  • Implement threading with one thread per database (as is already done for Android and WP(7/8) versions)

NOTE: this issue is opened in response to http://ost.io/@litehelpers/Cordova-sqlite-storage/topics/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant