• 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: "You can create a window on a secondary thread."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "You can create a window on a secondary thread."


  • Subject: Re: "You can create a window on a secondary thread."
  • From: j o a r <email@hidden>
  • Date: Tue, 6 Mar 2007 20:56:32 +0100


On 6 mar 2007, at 20.39, Jerry Krinock wrote:

There is ample documentation and disussion explaining how to run such a long
task in a secondary thread. But in my case the app cannot continue until
the downloaded data is processed; I therefore ^do^ want the app to block
during the download, except that my "Cancel" button must be responsive.

That your application "cannot continue" before you have downloaded this piece of data doesn't mean that you need to block the main thread for the duration. Just save the current state and do the download using the asynchronous APIs (No need for you to maintain that second thread). Once the download is completed, continue whatever you were about to do. You can re-design your app in this way, and it's the right way to do it (IMO).


j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: "You can create a window on a secondary thread."
      • From: Jerry Krinock <email@hidden>
References: 
 >"You can create a window on a secondary thread." (From: Jerry Krinock <email@hidden>)

  • Prev by Date: "You can create a window on a secondary thread."
  • Next by Date: Re: "You can create a window on a secondary thread."
  • Previous by thread: "You can create a window on a secondary thread."
  • Next by thread: Re: "You can create a window on a secondary thread."
  • Index(es):
    • Date
    • Thread