• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSUserDefaults & thread safety
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSUserDefaults & thread safety (From: Jonathan del Strother <email@hidden>)
 >Re: NSUserDefaults & thread safety (From: Derrick Bass <email@hidden>)
 >Re: NSUserDefaults & thread safety (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: NSView setFrameSize
  • Next by Date: NSPanel question
  • Previous by thread: Re: NSUserDefaults & thread safety
  • Next by thread: Re: NSUserDefaults & thread safety
  • Index(es):
    • Date
    • Thread