Maybe a stupid question to ask but I need some confirmations on it.
Usually, when I deal with objects that can be used multiple times within my application I use an
NSNumberFormatter
is mutable, so it is generally not thread safe and cited in Thread Safety Summary (see the "Thread-Unsafe Classes" section) in the non thread safe classes list.
But if you treat your object as an immutable object, you don't have to worry about race conditions. So for example, you cannot change the format if there are multiple threads accessing the formatter. If _internal_numberFormatter
isn't altered in any way, and you have just these two methods in the category, you should consider it thread safe.