25b Subj : _beginthread -- how to terminate a thread from out side of it. To : comp.programming.threads From : liangbowen Date : Wed Aug 24 2005 01:53 am As i konw, the only way to to terminate a thread started by _beginthread() is to user _endthread() (or return) inside the thread. now i started a thread(TodoThread), and created a listenning socket inside the thread. I want to destroy the socket and kill the thread at anytime if there is no client connect to it. How? void TodoThread(PVOID pvoid){ //creat a tcp socket //then listen accept(); //..... } . 0