I have an iPhone app that is using sqlite 3.6 (not with FMDB) to store and load data. I load the database when the app loads and uses the same database connection through th
This is all explained in the Core Data Programming Guide in the section for Concurrency.
The pattern recommended for concurrent programming with Core Data is thread confinement.
You should give each thread its own entirely private managed object context and keep their associated object graphs separated on a per-thread basis.
There are two possible ways to adopt the pattern:
Create a separate managed object context for each thread and share a single persistent store coordinator. This is the typically-recommended approach.
Create a separate managed object context and persistent store coordinator for each thread. This approach provides for greater concurrency at the expense of greater complexity (particularly if you need to communicate changes between different contexts) and increased memory usage.