Subj : Re: killing thread To : comp.programming.threads From : Vitale Ferruccio Date : Wed Aug 10 2005 04:09 pm Hi Alexander,, in page you reported, I read: .... This period ends at the current time plus the specified interval. The routine will not return before the end of the period is reached, but may return an arbitrary amount of time after the period has gone by. If I understand well, this solution doesn't let me interrupt this thread: am I right? :-| Ferruccio On 2005-08-10 16:48:09 +0200, Alexander Terekhov said: > > Alexander Terekhov wrote: > [...] >>> 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? :-) >> >> http://sources.redhat.com/pthreads-win32/manual/pthread_delay_np.html > > If "_np" is a problem for you, roll your own portable version using > pthread_cond_timedwait(). > > regards, > alexander. -- /dev/zero Unix Power @ Your Service http://www.devzero.it .