Create a Grand Central Dispatch queue that will only be on one thread, for Core Data
core-data, grand-central-dispatch, multithreading
Solution
Yes; just create the queue with the flag `DISPATCH_QUEUE_SERIAL` (this is also the default). But do be careful moving core data operations onto another thread. A given `NSManagedObjectContext` must only be used on a single thread, so you'll need two contexts, one for your main thread and one for your background thread. Doing this correctly can require some care.
You may want to investigate `UIManagedDocument` (if this is iOS5), which does much of this work for you. At the very least you should read over its documentation so you learn about its use of parent and child contexts for multithreading.
Problem
Is there a way to create GCD queue that runs on just one thread? I want to use that queue to handle Core Data operations.