Conflicting documentation on thread-safety of UIGraphicsPushContext

Originator:robnapier
Number:rdar://11161530 Date Originated:3/31/2012
Status:Open Resolved:
Product:Documentation Product Version:5.1
Classification:Other Bug Reproducible:N/A
 
31-Mar-2012 10:57 AM Rob Napier:
The documentation for UIGraphicsPushContext (http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html) indicate that "You should call this function from the main thread of your application only."

However, the iOS 4 release notes indicate "Drawing to a graphics context in UIKit is now thread-safe. Specifically: The routines used to access and manipulate the graphics context can now correctly handle contexts residing on different threads."

Furthermore, QA1637 says "Important Beginning with iOS 4.0, drawing to a graphics context in UIKit is thread-safe. This includes accessing and manipulating the current graphics stack, drawing images and strings, and usage of color and font objects from secondary threads."

It is unclear how "manipulating the graphics context" and "manipulating the current graphics stack" can be thread safe, but UIGraphicsPushContext not be.

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!