> On Sep 5, 2014, at 1:48 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > It seems to me you’re *still* abusing the main thread. A dispatch_sync blocks > the main thread, so it can’t be allowed to do anything that run > asynchronously on the main thread (such as displaying a dialog) since that > won’t complete.
Why not? I assume Jonathan's -shouldIAccept: is running a nested event loop for the modal panel, since it doesn't return till the user dismisses it. (Whether it's a dispatch_sync or a dispatch_async doesn't matter; the main thread will be blocked for as long as the block takes to run.) I still think the problem is that you're blocking the dispatch-queue's thread for a long time. Try pausing the app while the dialog is up and looking at what the various threads are doing. —Jens _______________________________________________ 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