• 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: Scott Ribe <email@hidden>
  • Date: Tue, 05 Dec 2006 08:25:07 -0700
  • Thread-topic: Synchronizing Thread Execution

> Note that you'd want to make sure that this string is unique within
> your code

Actually, if it really just needs a pointer, then:

 static int foo;
 ...
 @synchronized(&foo)
 ...

Problem is, even though the current implementation just goes off the pointer
value, the documentation does state " The @synchronized() directive takes as
its only argument any Objective-C object...". But then a couple of
paragraphs later it uses the selector _cmd, and selectors are *NOT*
Objective-C objects. This contradiction may have lead to the earlier
confusion where someone (OP?) was trying to get the name of the selector and
use that...

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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

  • Follow-Ups:
    • Re: Synchronizing Thread Execution
      • From: Alastair Houghton <email@hidden>
References: 
 >Re: Synchronizing Thread Execution (From: glenn andreas <email@hidden>)

  • Prev by Date: Faking out modality with validateMenuItem:
  • Next by Date: Re: Synchronizing Thread Execution
  • Previous by thread: Re: Synchronizing Thread Execution
  • Next by thread: Re: Synchronizing Thread Execution
  • Index(es):
    • Date
    • Thread