Skip to content

multi threading support? #365

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

Closed
music4kid opened this issue Feb 27, 2016 · 2 comments
Closed

multi threading support? #365

music4kid opened this issue Feb 27, 2016 · 2 comments

Comments

@music4kid
Copy link

It appears that all read and write operations happens on the same serial queue, which could be quite inefficient if there is a read task (from the main thread) behind a heavy write task.

maybe a new api for specifying custom queue, and let developers build their own threading model?

@ryanholden8
Copy link

Each connection should be a serial queue, this is how a sqlite connection should work. Threading at query level to one connection would cause issues.

Threading should be done with multiple connections. For example: First, setup a UI connection that is read-only and is prioritized. Second, setup a background connection with read-write access. Your thread management code should deal with those connections. Thus this library is one step lower than than threading coordination code, your app should manage that and this library will work with it.

Also see WAL mode for sqlite: https://www.sqlite.org/wal.html

@jberkel
Copy link
Collaborator

jberkel commented Dec 7, 2016

see the various pool related issue, e.g. #411

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

No branches or pull requests

3 participants