• 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: Andrew Farmer <email@hidden>
  • Date: Tue, 5 Dec 2006 02:08:51 -0800

On 05 Dec 06, at 01:12, leenoori wrote:
On 12/5/2006, at 10:06, Chris Suter wrote:
You're getting confused.

static id foo = nil;

foo is a pointer and it's value is nil. It's the value that counts, not the location of the variable foo.

@synchronized (foo)

is equivalent to

@synchronized (nil)

- Chris

Thanks a lot of the clarification. I thought that @synchronized worked as though you'd written @synchronized(&foo), but I guess the syntactic sugar doesn't go that far!

Nope - that would make @synchronized(self) kind of useless, now, wouldn't it?
_______________________________________________


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>)
 >Re: Synchronizing Thread Execution (From: leenoori <email@hidden>)
 >Re: Synchronizing Thread Execution (From: Chris Suter <email@hidden>)
 >Re: Synchronizing Thread Execution (From: leenoori <email@hidden>)

  • Prev by Date: Re: Synchronizing Thread Execution
  • Next by Date: Linking a model to an UndoManager with KVC/KVO
  • Previous by thread: Re: Synchronizing Thread Execution
  • Next by thread: Re: Synchronizing Thread Execution
  • Index(es):
    • Date
    • Thread