Documentation for NSManagedObjectContext has insufficient detail for method perf
| Originator: | quellish | ||
| Number: | rdar://14310964 | Date Originated: | Sat, 29 Jun 2013 04:11:47 GMT |
| Status: | Open | Resolved: | |
| Product: | Documentation | Product Version: | |
| Classification: | Reproducible: | Always |
Summary: iOS 5 introduced queue confinement for managing the concurrency of NSManagedObjectContexts. To use this functionality developers must submit blocks to the context using performBlock: or performBlockAndWait: . This is currently best documented in the iOS 5 release notes: http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniOS/Articles/iOS5.html And in 2011 and 2012 WWDC Core Data sessions. The relevant portion of the iOS 5 release notes is: "The performBlockAndWait: method supports API reentrancy. The performBlock: method includes an autorelease pool and calls the processPendingChanges method upon completion." The documentation for NSManagedObjectContext 's performBlockAndWait: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/NSManagedObjectContext.html#//apple_ref/doc/uid/TP30001182-SW46 Does not contain any of the information about this method that is in the iOS 5 release notes. This should cover: - performBlockAndWait does use an autorelease pool - performBlockAndWait does not process user events (does not call processPendingChanges) This is important to include as it can have serious side effects, as developers are likely to assume these things will happen. For the most part, user events are invisible to developers even though they can be critical to the behavior of Core Data at runtime. Additionally, some methods may be unsafe or ill advised to call within performBlockAndWait: due to it's synchronous or reentrant nature. Providing guidance in the documentation would be helpful. Steps to Reproduce: Expected Results: Actual Results: Regression: Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!