Re: Techniques for thread communication
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.