• 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: External kill of an NSThread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: External kill of an NSThread?


  • Subject: Re: External kill of an NSThread?
  • From: "Philip Q" <email@hidden>
  • Date: Tue, 21 Nov 2006 15:31:16 +1300

On 21/11/06, Roland Torres <email@hidden> wrote:
How does one kill an NSThread from another thread? As I read the
documentation, it seems possible only from within the thread, by
calling MPExit(). If I have a thread that hangs, I'd like to kill it
from another thread, but I don't see an API to do this. NSThread
doesn't return a thread id or descriptor, so how does one manage them?

Simply: you can't with NSThreads. A thread will end when it's starting function returns (or something like MPExit()), and this is a good thing.

Take a read of:
<http://www.cocoadev.com/index.pl?HowToKillAFrozenThread>
for a good discussion on why you can't do it, specifically: "It's
mutually assured destruction: kill it and die yourself."

-Phil
_______________________________________________
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


References: 
 >External kill of an NSThread? (From: Roland Torres <email@hidden>)

  • Prev by Date: Re: Manually loading into a Core Data model
  • Next by Date: [Moderator] EOT Re: Approved file [:.VIRUS.:]
  • Previous by thread: Re: External kill of an NSThread?
  • Next by thread: Re: External kill of an NSThread?
  • Index(es):
    • Date
    • Thread