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 (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]