killing a thread...

  • Follow


Is there any way to kill any pthread ???
I have two threads running and I wanna kill one thread from another
thread.
I donno understand what value to use for 2nd parameter to use
pthread_kill...
0
Reply a.k.vora (41) 9/21/2008 6:12:21 AM

Neel wrote:
> Is there any way to kill any pthread ???
> I have two threads running and I wanna kill one thread from another
> thread.
> I donno understand what value to use for 2nd parameter to use
> pthread_kill...

comp.programming.threads is the place to ask.

Nine times out of ten wanting (I assume that's what "wanna" means) to
kill a thread is a design smell.

-- 
Ian Collins.
0
Reply ian-news (9881) 9/21/2008 8:06:38 AM


Neel wrote:
> Is there any way to kill any pthread ???
> I have two threads running and I wanna kill one thread from another
> thread.
> I donno understand what value to use for 2nd parameter to use
> pthread_kill...

Two options:

a) place the other thread in a separate process.
b) don't kill the other thread but instrument the code to have a "get 
out quick" flag.

Other than those there are some pthread specific things but I would 
steer away from them.
0
Reply gi4nospam1 (93) 9/28/2008 12:29:45 AM

2 Replies
25 Views

(page loaded in 0.053 seconds)

Similiar Articles:













7/26/2012 10:03:14 PM


Reply: