Re: @synchronized produces warning on messages to super
Re: @synchronized produces warning on messages to super
- Subject: Re: @synchronized produces warning on messages to super
- From: Shaun Wexler <email@hidden>
- Date: Wed, 25 Jan 2006 10:11:41 -0800
On Jan 25, 2006, at 8:24 AM, Shawn Erickson wrote:
On 1/25/06, Jonathan del Strother <email@hidden> wrote:
I found an oddity in @synchronized() behaviour - it produces warnings
on any messages to super that appear after the @synchronized
directive. As a trivial (and nonsensical) example :
@synchronized(@"blah") {}
Are you really synchronizing against a string constant?
I don't see a problem with that, especially if it's a unique/global
object. @synchronized utilizes a small pool of mutexes which are
indexed by a hash of the object pointer. You could probably do this
just as effectively (untested):
@synchronized((id)0) {}
@synchronized((id)1) {}
etc...
--
Shaun Wexler
MacFOH
http://www.macfoh.com
"A person who never made a mistake never tried anything new." -
Albert Einstein
_______________________________________________
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