On Nov 6, 2015, at 1:23 PM, David Duncan wrote: > >> On Nov 6, 2015, at 8:36 AM, Alex Zavatone <z...@mac.com> wrote: >> >> Bearing in mind my experience dealing with code in the past that was chock >> full of runOnMainQueueWithoutDeadlocking calls, I can not fathom why someone >> who was not updating the UI would need to use this type of approach… >> everywhere. >> >> Besides complete ineptitude, is there a rational reason that any one of you >> can think of why someone would be using this for GCD dispatches instead of >> just making and using their own GCD dispatch queue? >> >> Before I start destroying the universe and changing this (in a fork), I'd >> like to hear the words of those much smarter than I on this subject. >> >> >> But seriously, WHY? > > Roughly this approach reads like a lock that uses the main queue as its > locking point. Without understanding what is being protected, it is hard to > tell why this is being done. > > The usage of dispatch_sync() says that whomever wrote this expected to have > the results available immediately. If not, then simply switching to > dispatch_async() may be sufficient in many cases. Beyond that you will > probably need to evaluate what work is being done in these cases. >
David, that's simply a perfect test. Thanks much for that insight. Here's hoping that it will be that simple to clean up. Cheers _______________________________________________ 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