Re: Cheating a synchronous call on the main thread
Re: Cheating a synchronous call on the main thread
- Subject: Re: Cheating a synchronous call on the main thread
- From: Scott Ribe <email@hidden>
- Date: Mon, 29 Jun 2015 12:49:06 -0600
On Jun 29, 2015, at 12:22 PM, Gavin Eadie <email@hidden> wrote:
>
> Q: “Can anyone suggest a trick that allows an apparently synchronous call on the main thread without impacting performance?”
The problem is that the requirement is self-contradictory: "synchronous" means wait, and "without impacting performance" means don't wait. While the real requirement is probably more like "do certain things while the bg task is running, then do something else when it completes". To really answer the question, you have to break down what needs to be while the bg task is running and what has to be done after, then categorize those into the type of tasks, such as whether or not they interact with UI and thus have to run on the main thread, and so on.
It sounds to me like your friend is trying to avoid that level of analysis with a hand-wavy magic solution that both waits and does not wait. Sorry, but it's time to open that box and see if the damned cat is dead or not ;-)
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice
_______________________________________________
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