killing a thread
Posted on 2005-04-11
How can I kill a thread which is create by pthread_create function???
What I do is I create two threads by "pthread_create", server_thread and client_thread.
And server_thread runs first, and then, client_thread will detect whether there is a socket connection, if yes, I would like to terminate server_thread.
I try to use "kill(server_thread, 1)" and it seems like server_thread is still running...and I try "pthread_kill(server_thread, 9)", it seems like my program is terminated...any suggestion how can I do this???