Re: NSUserDefaults & thread safety
Re: NSUserDefaults & thread safety
- Subject: Re: NSUserDefaults & thread safety
- From: Jonathan del Strother <email@hidden>
- Date: Wed, 25 Jan 2006 16:09:08 +0000
On 25 Jan 2006, at 15:54, Adam R. Maxwell wrote:
On Jan 25, 2006, at 04:22, Derrick Bass wrote:
On Jan 25, 2006, at 5:47 AM, Jonathan del Strother wrote:
According to the documentation, NSUserDefaults isn't thread
safe. Does this mean that any access to NSUserDefaults outside
of the main thread is a really bad idea, or am I safe to restrict
write-access to the main thread and let any thread have read-access?
See this message: <http://www.cocoabuilder.com/archive/message/
cocoa/2005/8/11/144082>, which indicates that you can probably
ignore the caution-badged warning in the NSUserDefaults API
documentation.
Hmm, I totally forgot that I posted that. What's that quote - "those
who cannot remember the past are condemned to repeat it"? :)
Either way, I've just gone and @sync'd every single NSUserDefaults
access in my app (*sigh*), so I'll see if that fixes the odd crash I
mentioned in my previous message...
Cheers,
Jon
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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