• 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: Threading - How its done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading - How its done?


  • Subject: Re: Threading - How its done?
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 07 May 2008 22:26:13 -0700

On May 5, 2008, at 10:12 PM, Michael Vannorsdel wrote:

Now if two threads are just reading the same piece of data it's ok for them to do so at the same time,

I don't know what gave you this idea, but it's simply not correct in the general case.


Whether you're accessing or changing shared data, you need to be using proper synchronization primitives. In special circumstances you can use things like atomic operations or barrier primitives, but in general if you're going to share data you must synchronize access to it.

  -- Chris

_______________________________________________

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: Threading - How its done?
      • From: Michael Vannorsdel <email@hidden>
References: 
 >RE: Threading - How its done? (From: Karl von Moller <email@hidden>)
 >Re: Threading - How its done? (From: Michael Vannorsdel <email@hidden>)
 >Re: Threading - How its done? (From: Karl von Moller <email@hidden>)
 >Re: Threading - How its done? (From: Michael Vannorsdel <email@hidden>)

  • Prev by Date: Re: NSStream blocking behavior?
  • Next by Date: Re: Threading - How its done?
  • Previous by thread: Re: Threading - How its done?
  • Next by thread: Re: Threading - How its done?
  • Index(es):
    • Date
    • Thread