Subj : Re: killing thread To : comp.programming.threads From : Vitale Ferruccio Date : Wed Aug 10 2005 03:22 pm Hi, my program runs under *nix and windows, I'm using POSIX threads. For clearance, I report two small peace of code: void * thread_timer(void *parg) { sleep(200); pthread_exit(NULL); return NULL; } void * thread_execute(void *parg) { pthread_cancel(thread_id_of_timer_thread); pthread_exit(NULL); } After thread_execute calls pthread_cancel, I thought that the thread would be cancelled: instead thread_timer exists only when 200 seconds are passed. I could now rewrite my question: how can I put to sleep a thread and interrupt its execution? :-) Ferruccio -- /dev/zero Unix Power @ Your Service http://www.devzero.it .