I need the concurrence type of NSPersistentDocument's managedObjectContext to be NSMainQueueConcurrencyType because I need contexts in other threads.
Can concurrence type be changed of NSPersistentDocument's managedObjectContext?
198 Views Asked by 93sauu At
2
There are 2 best solutions below
0
Tom Harrington
On
The documentation for NSPersistentDocument says this about the managedObjectContext property:
If you want to customize the creation of the persistence stack, reimplement this property in your custom subclass and use your implementation to create the appropriate objects.
That seems pretty clear. Override this property and use whatever concurrency type you want. Have you tried it? Did it not work?
Related Questions in OBJECTIVE-C
- How do I customize NSOutlineView to have border color?
- UIWebView Screen Fitting Issue
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Image and Text locations in UIButton
- setting OpenGL version in objective-C
- Setup code for xibs in iOS. -awakFromNb:
- realm db, get parent link of object
- CFBundleDocumentType is not working in myproject-Info.plist file
- UIPopoverPresentationController not rendering properly
- Using Storyboard Reference
- Pass Data between two view controllers using 'Delegation' : Objective-C
- Unexpected CALayer Vertical Flipping on 3D Rotation 'Bounce'
- Setting View orientation to portrait is ignored
- UITextField append / between dates while enforcing character limit
Related Questions in MULTITHREADING
- new thread blocks main thread
- WPF MessageBox Cancel checkbox check
- How to avoid concurrent access to a resource?
- run oncomplete event in async
- Threading Segfault when reading members
- Function timeouts in C and thread
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Acumatica perfomance with threads
- Wait and Notify in Java threads for a given interval
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
- How to return blocking queue to the right object?
- background thread using Task.Run
- deletion and cleanup of worker thread in Qt crashes
- Pipeline-like operation using TChan
- implementing in app purchase on android
Related Questions in CORE-DATA
- Swift code with multiple NSDateFormatter - optimization
- IOS Where To Persist Current User from Back-end
- iCloud Core Data "no document at URL"
- restrict sqlite-wal and sqlite-shm from icloud backup
- Delegate returning nil - Swift
- How to set a core-data attibute to nil, in Swift?
- iOS make task run on background thread Thread safe?
- Calling method on object in NSPredicate with Core Data
- How to get Managed Object context from RestKit 0.20
- Write NSData in NSHomeDirectory
- My app is crashing when I assign the managed object context to a variable
- Fetch unique object based on attribute name from coredata
- NSPredicate filter part of array
- Property 'package_number_7' not found on object of type 'User *' after Lightweight Migration
- Core Data relationship Many-To One
Related Questions in NSMANAGEDOBJECTCONTEXT
- Swift get specific NSManagedObject from entity (core data)
- Core Data properties based upon relationships returning NULL
- Core Data concurrency queue style MOC getters thread safety
- managed object context nil restkit while unitTesting
- Data not reloading automatically in uitableview when using nsfetchedresultscontroller
- Can concurrence type be changed of NSPersistentDocument's managedObjectContext?
- NSFetchedResultsController with transformable attribute
- How to merge unsaved NSManagedObjectContext changes from one context to another?
- Xcode 8.1 - NSManagedObjectContext missing in AppDelegate
- Pointer to a NSManagedObject outside a performBlock
- CoreData NSManagedObjectContext not found
- Core data concurrency: avoid writing at two seperate places
- Find an updated NSManagedObject via NSPredicate
- Remove NSManagedObject within commitEditingStyle
- Crash when trying to save NSManagedObject
Related Questions in NSPERSISTENTDOCUMENT
- Can concurrence type be changed of NSPersistentDocument's managedObjectContext?
- Is it bad to use NSPersistentDocument with an alternate save format?
- NSDocument: The document could not be autosaved. The file has been changed by another application
- Is -makeWindowControllers the best place to initialize an NSPersistentDocument?
- NSManagedObjectContextObjectsDidChangeNotification not always called instantly
- Is there a newer version of NSPersistentDocument Core Data Tutorial for Mac OS X v10.4?
- Where to get managed object context in NSPersistentDocument?
- What happend with external records in NSPersistentDocument documents?
- How to read an object from managedObjectContext in Core Data ( Xcode )
- "Save As" does not work for my NSPersistentDocument application
- SQLite-based NSPersistentDocument in a sandboxed environment
- Mac / iPhone app - syncing core data to iCloud & devices (using core data)
- Runtime-generated Custom NSManagedObjectModel for NSPersistentDocument
- How to save a setting into Core Data when a document is closed
- Using NSPersistentDocument to create 'Documents'
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes, you were right. Overriding manageObjectContext you can modify concurrency type. Maybe, I have some mistakes.