>> 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. Yes, I'm running the NSTask in a separate thread so that the main run loop will not be effected.I just want the thread to exit once the NSTask is completed. >> 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? If I look at Activity Monitor I can see the number of threads I have, and when the NSTask thread is completed it's still present. >> 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 Thanks, tom _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]