Re: Modifying outside properties from NSOperation subclass
Re: Modifying outside properties from NSOperation subclass
- Subject: Re: Modifying outside properties from NSOperation subclass
- From: Jens Alfke <email@hidden>
- Date: Wed, 16 Dec 2009 20:57:13 -0800
On Dec 14, 2009, at 7:59 PM, PCWiz wrote:
> "doResourceHungryTask" would be a method in my delegate class. Would I still need to lock/unlock (I'm modifying the class's properties from itself, not another class)? I'm not sure on the exact workings of NSInvocationOperation, I just found out about it.
I would suggest you either take a break and read some overview material on concurrency and threading; or avoid touching any external data from within an active NSOperation. If you try to write concurrent code without having a solid understanding of what you're doing, the results are going to be horrible. There is nothing in computer science as frustrating to debug as broken multithreaded code. :-/
—Jens_______________________________________________
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