Re: GCD killed my performance
Re: GCD killed my performance
- Subject: Re: GCD killed my performance
- From: Quincey Morris <email@hidden>
- Date: Sat, 26 Apr 2014 13:55:00 -0700
On Apr 26, 2014, at 12:02 , Kyle Sluder <email@hidden> wrote:
> FWIW, I’ve been of the opinion for a while that including dispatch_sync in the API was a mistake. Too often it becomes a crutch used without understanding, resulting in stop-start behavior across threads or cores.
I don’t know if you’ll agree, but it seems to me that there’s a distinction between a *locking* mechanism such as @synchronized, and a *queuing* mechanism, which Jens seems to have demonstrated dispatch_sync to be.
I understand that both mechanisms may at a lower level depend on both queues and locks, but the distinction I’m making is that a locking mechanism is used when we hope that the lock will generally be granted without contention, while a queuing mechanism is used when we expect there will generally be some contending operation in progress.
_______________________________________________
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