On May 14, 2012, at 8:52 AM, Glenn L. Austin wrote: > Read up on Grand Central Dispatch. It can manage pretty much all of the hard > work of parallelizing code, including replacing synchronization primitives > like Mutexes and CriticalRegions (just access those sections on a single GCD > queue with dispatch_sync, and you're guaranteed synchronous access).
For "single GCD queue", you should have said "single *serial* GCD queue". And you don't have to use dispatch_sync() to get synchronization among the tasks queue to a serial queue. You can use dispatch_async(). The difference between the two is whether the completion of the queued task is synchronous with the *caller*, not with each other. And, if at all possible, you should design your code to not need to use dispatch_sync(). Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com