Re: Synchronizing Thread Execution
Re: Synchronizing Thread Execution
- Subject: Re: Synchronizing Thread Execution
- From: Andrew Farmer <email@hidden>
- Date: Tue, 5 Dec 2006 02:08:51 -0800
On 05 Dec 06, at 01:12, leenoori wrote:
On 12/5/2006, at 10:06, Chris Suter wrote:
You're getting confused.
static id foo = nil;
foo is a pointer and it's value is nil. It's the value that
counts, not the location of the variable foo.
@synchronized (foo)
is equivalent to
@synchronized (nil)
- Chris
Thanks a lot of the clarification. I thought that @synchronized
worked as though you'd written @synchronized(&foo), but I guess the
syntactic sugar doesn't go that far!
Nope - that would make @synchronized(self) kind of useless, now,
wouldn't it?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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