NSURLCache: not documented if it is thread safe
| Originator: | avedesk | ||
| Number: | rdar://25823350 | Date Originated: | 20-Apr-2016 08:12 AM |
| Status: | Resolved | Resolved: | |
| Product: | Documentation | Product Version: | 9.3.1 |
| Classification: | Enhancement | Reproducible: | Always |
Summary: NSURLCache seems like it could be called on multiple threads by the system/applications, but the documentastion for NSURLCache doesn't state if this is even allowed. It would be great if this could be documented and/or what the expected usage on multiple threads is. Are apps allowed to call methods on the sharedURLCache URL: https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSURLCache_Class/ Steps to Reproduce: - Use NSURLCache on the main thread or on a background thread Expected Results: - Confidence that using the sharedURLCache from the main thread or a background thread will not crash or that it's forbidden to do so. Actual Results: - Cluelessness what will happen. Living in constant fear that a crash might happen 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!
Resolved
Apple has fixed this issue by providing documentation on the thread safety of NSURLCache: https://developer.apple.com/reference/foundation/nsurlcache
Starting with iOS8 and macOS 10.10, NSURLCache is thread safe