• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to exit a thread help...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to exit a thread help... (From: Tom Jones <email@hidden>)

  • Prev by Date: Re: what do you use to make icons and similar?
  • Next by Date: Sizing strangeness in the land of NSDrawer
  • Previous by thread: How to exit a thread help...
  • Next by thread: Re: How to exit a thread help...
  • Index(es):
    • Date
    • Thread