Re: Synchronizing Thread Execution
Re: Synchronizing Thread Execution
- Subject: Re: Synchronizing Thread Execution
- From: Alastair Houghton <email@hidden>
- Date: Wed, 6 Dec 2006 18:10:51 +0000
On 6 Dec 2006, at 17:53, Scott Ribe wrote:
I'm not sure,
therefore,
what it is that you're disagreeing with.
- I misread the example and somehow saw @synchronized(_cmd) instead.
- But I have just verified on 10.4.8 that NSStringFromSelector
(_cmd) returns
a distinct NSString instance with each invocation. So unless
@synchronized
does some compiler voodoo with a hidden static variable to only
evaluate it
once, or uses something other than object identity in order to map
locks,
the example is wrong.
Agreed, the example looks broken to me too. I also checked
NSStringFromSelector()'s behaviour (and disassembled it for good
measure). About the only thing I can think is that CFString's
implementation might once have unified the strings where now it doesn't.
I've filed a bug report: rdar://4867651
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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