Re: MPProcessing in Lion
Re: MPProcessing in Lion
- Subject: Re: MPProcessing in Lion
- From: "Glenn L. Austin" <email@hidden>
- Date: Tue, 15 May 2012 07:05:35 -0700
On May 14, 2012, at 8:43 AM, Ken Thomases wrote:
> 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().
True, and thanks for the clarification and correction.
I blame lack of caffeine on my mis-statements.
--
Glenn L. Austin, Computer Wizard and Race Car Driver <><
"Where there's breath, there's hope!"
<http://www.austin-soft.com>
_______________________________________________
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