Re: Wait for NSTask to finish
Re: Wait for NSTask to finish
- Subject: Re: Wait for NSTask to finish
- From: <email@hidden>
- Date: Wed, 16 Mar 2005 10:10:07 +0000
>
> 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
_______________________________________________
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