Re: External kill of an NSThread?
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