Re: Recuperating after NS_HANDLER
Re: Recuperating after NS_HANDLER
- Subject: Re: Recuperating after NS_HANDLER
- From: Nicko van Someren <email@hidden>
- Date: Mon, 17 May 2004 11:13:02 +0100
On 17 May 2004, at 1:56, Shaun Wexler wrote:
On May 16, 2004, at 5:45 PM, Ondra Cada wrote:
Aha, thanks. Truth is, being an old NeXTie I am used to NS_HANDLER et
al, and although I have noticed the docs and release notes, I know
next to nothing of those new directives.
Incidentally...
I was referring to ObjC @try/@catch/@finally rather than NS_HANDLER
macros
... are the differences between those two explained anywhere? So far
I have found no detailed explanation of potential (dis)advantages of
@try... vs. NS_HANDLER family, potential catches when mixing them, et
cetera. Just as well, is there a similar explanation/comparation of
NS...Lock vs. @synchronized?
NSLock will have more overhead than @synchronized(), which uses a hash
of the object's address as an index to a small shared pool of
pthread_mutex locks, and will be faster than NSLock in most cases.
When I wrote my own fine-grained locking functions, I compiled a
fairly accurately profile (pthread_mutex_lock does not include any
@synchronized macro overhead):
Since j o a r seems to be away from the computer at the moment I feel
compelled to interject that the inclusion of any concrete timing
numbers on this list will be taken as smelling of premature
optimisation :-)
Nicko
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.