• 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: Buddy Kurz <email@hidden>
  • Date: Tue, 5 Dec 2006 08:08:17 -0800

FYI: The Darwin source contains a comment that specifically says @synchronized(nil) does nothing.

I'm wondering what the difference is between
@synchronized(myObject) {
//do stuff
}
and
{
[myLock lock];
//do stuff
[myLock unlock];
}


On Dec 5, 2006, at 6:20 AM, Scott Ribe wrote:

@synchronized does not interact with the object
in any way, doesn't send it any messages, at least as far as I know,
so why would it have to be initialized?

You may be right about that, but nil is still not a good idea...

--
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

_______________________________________________

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: Re: Synchronizing Thread Execution
      • From: "Clark Cox" <email@hidden>
    • Re: Synchronizing Thread Execution
      • From: leenoori <email@hidden>
    • Re: Synchronizing Thread Execution
      • From: Scott Ribe <email@hidden>
References: 
 >Re: Synchronizing Thread Execution (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Sub classing.
  • 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