2

What happens if two separated threads on the same android application try to access the same table in SQLite database? May I have conflict?

4
  • Please make your question more clear by posting code snippets. Commented Sep 13, 2012 at 13:34
  • 2
    Not an exact duplicate, but this may well answer your question: stackoverflow.com/questions/6675240/… Commented Sep 13, 2012 at 13:35
  • Please be clear . Provide more details. Commented Sep 13, 2012 at 13:46
  • 1
    This question may also be helpful: stackoverflow.com/questions/2493331/… Commented Sep 13, 2012 at 13:54

1 Answer 1

3

The SQLite faq states, that SQLite is thread safe with some (important) caveats. One point above it also states, that concurrent writes are prohibited even from multiple processes, and the write lock is file level. A similar question: Locking a row with SQLite (read lock ?) with a similar answer.


EDIT:

Don't want to steal from others, but the accepted answer in wsanville's question also answers your question perfectly... What are the best practices for SQLite on Android? (copied just in case if the comment's got deleted)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.