Re: Create an NSCharacterSet constant
Re: Create an NSCharacterSet constant
- Subject: Re: Create an NSCharacterSet constant
- From: Kyle Sluder <email@hidden>
- Date: Sun, 1 Nov 2009 21:55:51 -0800
On Sun, Nov 1, 2009 at 9:49 PM, Matt Neuburg <email@hidden> wrote:
> Why (I'm really asking, not arguing; I don't know anything about GCD) is
> this better than the traditional:
It avoids a race condition if +sharedFoo is called simultaneously from
different threads, and it's wicked fast (Cmd-DoubleClick dispatch_once
to see why). It's also got "once" in the name, and is roughly the
same shape as the traditional construction, so switching to it entails
minimal mental burden.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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