Thursday, February 24, 2011

Blocks + GCD Design Patterns

Colin Wheeler (via Brent Simmons):

Out of all the API calls I saw in grand central dispatch the one that initially impressed me least was dispatch_once. However after reading its documentation and using it a bunch I realized how useful this one API call is. Not only it is a dead simple way to ensure that code only gets executed once, but it is also thread safe.

Comments RSS · Twitter

Leave a Comment