Re: Messages between Threads
Re: Messages between Threads
- Subject: Re: Messages between Threads
- From: Chris Hanson <email@hidden>
- Date: Mon, 16 Mar 2009 01:52:16 -0700
On Mar 15, 2009, at 10:43 PM, Gerriet M. Denkmann wrote:
On 15 Mar 2009, at 15:43, Joar Wingfors <email@hidden> wrote:
Please refer to the Cocoa thread safety documentations:
<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html
Could you please point to the exact section where it is stated that
it is not OK to update a bound property from a background thread?
The part where it doesn't say it's safe to do so.
Your -add2Number: method is safe, but that's because it's updating sum
from the main thread, not a background thread. If you were invoking -
setSum: (which is what "self.sum =" does) from -add2Number: then it
wouldn't be safe.
-- 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