• 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: "Sean McBride" <email@hidden>
  • Date: Tue, 5 Dec 2006 11:46:08 -0500
  • Organization: Rogue Research

On 2006-12-05 17:37, leenoori said:

>El 5/12/2006, a las 17:08, Buddy Kurz escribió:
>
>> I'm wondering what the difference is between
>> @synchronized(myObject) {
>> //do stuff
>> }
>> and
>> {
>> [myLock lock];
>> //do stuff
>> [myLock unlock];
>> }
>
> From the programmer's perspective there are two important differences:
>
>1. @synchronized is Panther-and-up only
>
>2. @synchronized has an implicit exception handler; that is, if an
>exception is thrown inside the @synchronized block cleans up when you
>exit the block (on throwing) whereas in the NSLock version the lock
>is not cleaned up.

3. @synchronized is only supported by gcc 3.3 and up.  Older versions of
gcc and any version of CodeWarrior will generate compiler errors.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

  • Prev by Date: Re: Re: Synchronizing Thread Execution
  • Next by Date: Re: problems with modal window and menu command
  • Previous by thread: Re: Synchronizing Thread Execution
  • Next by thread: Re: Re: Synchronizing Thread Execution
  • Index(es):
    • Date
    • Thread