Re: How to exit a thread help...
Re: How to exit a thread help...
- Subject: Re: How to exit a thread help...
- From: Ken Thomases <email@hidden>
- Date: Sat, 25 Oct 2008 19:25:55 -0500
On Oct 25, 2008, at 1:00 PM, Tom Jones wrote:
I'm writing a Foundation tool and I need to run a NSTask in a
separate thread.
An NSTask is a different thing from a thread. Since NSTask provides
asynchronous notification of its death (and NSFileHandle provides
asynchronous methods for dealing with I/O), there should be no need to
use a separate thread to manage a task.
I have it working but when the task completes the thread is still
running. I tried issuing a [NSThread exit] but that did nothing.
By what evidence do you conclude the thread is still running, and
which thread are you talking about?
What am I missing?
I suspect it's because you aren't allowing any run loops to run. See
the thread beginning here: http://lists.apple.com/archives/Cocoa-dev/2008/Oct/msg01016.html
Cheers,
Ken
_______________________________________________
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