Re: Open a panel in secondary thread?
Re: Open a panel in secondary thread?
- Subject: Re: Open a panel in secondary thread?
- From: Steve Mills via Cocoa-dev <email@hidden>
- Date: Sun, 22 Mar 2020 21:52:40 -0500
On Mar 22, 2020, at 19:32:25, Sandor Szatmari <email@hidden>
wrote:
>
>
> The only issue I see is that if this code were ever called on the main
> thread. I don’t know if this is likely because we don’t know enough about
> the OP’s code. But if there is a chance a simple test would suffice.
>
> if ( [NSThread isMainThread] )
> // call code directly
> else
> // call dispatch_sync(…)
Right. That's standard practice.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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