• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cheating a synchronous call on the main thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cheating a synchronous call on the main thread
      • From: Gavin Eadie <email@hidden>
References: 
 >Cheating a synchronous call on the main thread (From: Gavin Eadie <email@hidden>)
 >Re: Cheating a synchronous call on the main thread (From: Scott Ribe <email@hidden>)
 >Re: Cheating a synchronous call on the main thread (From: Gavin Eadie <email@hidden>)
 >Re: Cheating a synchronous call on the main thread (From: Scott Ribe <email@hidden>)
 >Re: Cheating a synchronous call on the main thread (From: Gavin Eadie <email@hidden>)

  • Prev by Date: Re: Cheating a synchronous call on the main thread
  • Next by Date: Re: Cheating a synchronous call on the main thread
  • Previous by thread: Re: Cheating a synchronous call on the main thread
  • Next by thread: Re: Cheating a synchronous call on the main thread
  • Index(es):
    • Date
    • Thread