Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
- Subject: Re: detachDrawingThread:toTarget:withObject: vs detachNewThreadSelector:toTarget:withObject:
- From: Chris Hanson <email@hidden>
- Date: Wed, 27 Sep 2006 21:21:26 -0700
On Sep 27, 2006, at 3:56 AM, Antonio Nunes wrote:
The one place in my code where I know problems could occur I've
made thread safe using @synchronize.
The above is either incorrect terminology or not doing what you think
it is. All @synchronize does is declare a critical section linked to
some object: a lock around a section of code such that only a single
thread can be in *that section* of code *for that object* at the same
time.
Thus whether or not the code in your @synchronized block is thread-
safe depends a great deal on what the code actually does, and how it
interacts with the rest of the code in your applciation.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden