• 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: John Stiles <email@hidden>
  • Date: Mon, 20 Nov 2006 18:29:27 -0800

This is highly discouraged, since it cannot be done in a stable fashion. In specific, if your thread currently has any locks held or any resources acquired, there is no easy way to unlock or release. In the worst case, your thread's code could be deep inside the OS and could be holding internal OS-level locks—if you kill the thread at that point, your entire app is hung forever.

Basically, it's a bad idea. If your thread is hanging, debug the real problem and solve the hangs. Don't try to thread-kill.


On Nov 20, 2006, at 6:09 PM, Roland Torres 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?

Roland

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: External kill of an NSThread?
      • From: Filipe Varela <email@hidden>
References: 
 >External kill of an NSThread? (From: Roland Torres <email@hidden>)

  • Prev by Date: External kill of an NSThread?
  • Next by Date: Re: Manually loading into a Core Data model
  • Previous by thread: External kill of an NSThread?
  • Next by thread: Re: External kill of an NSThread?
  • Index(es):
    • Date
    • Thread