• 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: Wait for NSTask to finish
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wait for NSTask to finish


  • Subject: Re: Wait for NSTask to finish
  • From: Rakka <email@hidden>
  • Date: Thu, 17 Mar 2005 07:16:27 +1100


On Mar 16, 2005, at 9:10 PM, <email@hidden> wrote:


From: Rakka <email@hidden> Date: 2005/03/16 Wed AM 09:46:30 GMT To: email@hidden Subject: Wait for NSTask to finish

Hi,

Is there a way to wait for an NSTask (or a method I created) to finish
before continuing like waitUntilExit, but doesn't cause my app to
hang/become unresponsive?

Thanks

You could launch the NSTask on a seperate thread. This way it won't tie up the interface. If you launch the thread on the main event thread (the thread the interface is running on) then you want your app to become unresponsive until the thread is done so as not to "upset" the task you're running.


If you launch it in a seperate thread, you don't keep your interface hanging until it's done. I know this kind of thing has been asked before, so check the archives, it should turn some sample code up. Hope that helps!

James



I will try that too, thanks for the suggestions.

Will multiple threads slow anything down, or will it have no negative effect?

Thanks

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Wait for NSTask to finish (From: <email@hidden>)

  • Prev by Date: Re: Wait for NSTask to finish
  • Next by Date: Re: Cocoa Newbie book suggestions?
  • Previous by thread: Re: Wait for NSTask to finish
  • Next by thread: Re: Wait for NSTask to finish
  • Index(es):
    • Date
    • Thread