• 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: Synchronizing Thread Execution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronizing Thread Execution


  • Subject: Re: Synchronizing Thread Execution
  • From: Jim Correia <email@hidden>
  • Date: Fri, 8 Dec 2006 11:27:30 -0500

On Dec 7, 2006, at 6:43 PM, Scott Ribe wrote:

From the current Objective-C Programming Language reference:

That's what I'm reading as well. It's ambiguous with regard to whether
object identity or equality is what keys the mutexes, and quite possibly
incorrect with regard to using _cmd as the mutex.

The runtime is open source. It looks like @synchronized(mutex) ultimately compares the mutex by identity.


If you run this code, you'll see that s1 != s2.

NSString *s1 = NSStringFromSelector(@selector (applicationDidFinishLaunching:));
NSString *s2 = NSStringFromSelector(@selector (applicationDidFinishLaunching:));
NSLog(@"s1 = %p, s2 = %p", s1, s2);


Documentation bug filed.

Jim


_______________________________________________

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


References: 
 >Re: Synchronizing Thread Execution (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: A good book to start with thats recent
  • Next by Date: Re: Setting color to an NSView
  • Previous by thread: Re: Synchronizing Thread Execution
  • Next by thread: Re: Re: Synchronizing Thread Execution
  • Index(es):
    • Date
    • Thread