Re: NSUserDefaults & thread safety
Re: NSUserDefaults & thread safety
- Subject: Re: NSUserDefaults & thread safety
- From: Chris Hanson <email@hidden>
- Date: Wed, 25 Jan 2006 08:58:51 -0800
On Jan 25, 2006, at 4:22 AM, Derrick Bass wrote:
In general "not thread safe" means that it is okay to use from
different threads, as long as you make to sure to use some sort of
synchronization so only one thread at a time is accessing the
resource.
This is not the case in Cocoa. In Cocoa, "not thread-safe" means
that some functionality is only safe to use from the main thread
unless otherwise documented.
The reason for this is that the functionality in question may be
invoked by the Cocoa frameworks themselves. This means that you
cannot make sure that all access to the functionality are
appropriately synchronized, since you cannot modify Cocoa to do so.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden