In my iOS application, I am doing some work in the background thread (using performSelectorInBackground ). In this thread, I use NSJSONSerialization and its class methods to parse a JSON string:
self.json = [NSJSONSerialization JSONObjectWithData:self.data options:0 error:nil];
Is this class method ( JSONObjectWithData ) thread safe? Can I be sure of this? Where is this written in the documentation?
I know that instance methods are generally not thread safe unless they say so. Can I even say that class methods are thread safe, unless otherwise indicated?
ios thread-safety objective-c cocoa
kuba
source share