• 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: memory advice for still learning coder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory advice for still learning coder


  • Subject: Re: memory advice for still learning coder
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 3 Oct 2009 09:37:11 -0500

Oh, and I forgot to respond to this:

On Oct 3, 2009, at 9:17 AM, Rick C. wrote:

4. i don't believe i'm having a problem with the arrays being accessed the same time by different threads. although i am not using a lock.

If I'm understanding what you're saying, you're courting disaster. If there's any chance at all that a mutable array is being mutated in one thread at the same time as another thread is accessing the array, then you must guard that with a lock. The fact that (you think) you've never seen a problem in your testing so far is no guarantee that your app won't have a problem under different loads, on machines with different numbers of CPU cores, or just randomly but with somewhat low probability. The possible problem might be obvious, like a crash, but it might be insidious like data corruption that isn't immediately noticed.


Regards,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: memory advice for still learning coder
      • From: "Rick C." <email@hidden>
References: 
 >memory advice for still learning coder (From: "Rick C." <email@hidden>)
 >Re: memory advice for still learning coder (From: Ken Thomases <email@hidden>)
 >Re: memory advice for still learning coder (From: "Rick C." <email@hidden>)

  • Prev by Date: Re: memory advice for still learning coder
  • Next by Date: RE: CoreData async fetch request
  • Previous by thread: Re: memory advice for still learning coder
  • Next by thread: Re: memory advice for still learning coder
  • Index(es):
    • Date
    • Thread