• 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: Techniques for thread communication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Techniques for thread communication


  • Subject: Re: Techniques for thread communication
  • From: Chris Purcell <email@hidden>
  • Date: Tue, 9 Sep 2003 08:21:56 +0100

can one assume the assignment is atomic?

I always have made that assumption, and therefore assumed that the
following is totally thread safe:

-(void) setIntResult: (int) val { intResult = val; }
-(int) intResult { return intResult; }

I'd like to know if that's wrong.

Only if intResult is not word-aligned: word-aligned reads and writes are atomic on PPC and Intel alike.

Kritter out
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Techniques for thread communication
      • From: email@hidden (Peter Robinson)
  • Prev by Date: Arguments to an NSTask
  • Next by Date: Re: DragDropImageView
  • Previous by thread: Re: Techniques for thread communication
  • Next by thread: Re: Techniques for thread communication
  • Index(es):
    • Date
    • Thread