NSManagedObjectContext needs documentation for the performBlock methods
| Originator: | jkubicek | ||
| Number: | rdar://11247219 | Date Originated: | 13-Apr-2012 01:45 PM |
| Status: | Closed | Resolved: | |
| Product: | Documentation | Product Version: | iOS 5.1 |
| Classification: | Enhancement | Reproducible: | YES |
The documentation for the following methods in NSManagedObjectContext is insufficient. - (void)performBlock:(void (^)())block - (void)performBlockAndWait:(void (^)())block Expected Results: At the very least the methods should mention why you would want to use these methods. It would be better yet if the method documentation had a link to the Core Data Concurrency documentation. It would be best of all if these method docs contained a discussion of exactly what these methods do and when you can/should use them. Here are the questions that I'd like to be answered and expected the answer to be in the documentation for these methods. (or at least linked from them) 1) On what thread or queue do these blocks run? 2) When I declare a context on the main thread with NSPrivateQueueConcurrencyType type, can I safely access the context from a background thread? 3) When I am messaging a context declared with NSPrivateQueueConcurrencyType from the main thread, do I need to run all messages through the performBlock: method? 4) When I am messaging a context declared on the main thread with NSPrivateQueueConcurrencyType, but I am on a background thread, do I need to route all messages through the performBlock: method?
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!