Re: Wait for NSTask to finish
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