You can write your own dispatch queue by using a CFRunLoopSource and add an NSCondition to it when you need it to be synchronous (implementing dispatch_sync)
Sent from my iPad > On Apr 27, 2014, at 4:55 AM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > >> On Apr 26, 2014, at 12:02 , Kyle Sluder <k...@ksluder.com> 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 (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/xcvista%40me.com > > This email sent to xcvi...@me.com _______________________________________________ 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