On Mar 22, 2020, at 19:32:25, Sandor Szatmari <admin.szatmari....@gmail.com> 
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 (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

Reply via email to