killing a thread...

N

Neel

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...
 
I

Ian Collins

Neel said:
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.
 
G

Gianni Mariani

Neel said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top