• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: @synchronized produces warning on messages to super
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: @synchronized produces warning on messages to super
      • From: Shawn Erickson <email@hidden>
References: 
 >@synchronized produces warning on messages to super (From: Jonathan del Strother <email@hidden>)
 >Re: @synchronized produces warning on messages to super (From: Shawn Erickson <email@hidden>)

  • Prev by Date: [Ann] Seattle Xcoders meeting: 26 January 2006
  • Next by Date: Re: How to Create A TableView with Two Table Headers
  • Previous by thread: Re: @synchronized produces warning on messages to super
  • Next by thread: Re: @synchronized produces warning on messages to super
  • Index(es):
    • Date
    • Thread