[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threads question



I'd highly recommend using the pthread_cond* functions or another mutex.
That usage of a timer to control syncroinization(sp?) between two threads
is a bad idea.  

On Sat, 2 Dec 2000, Adam Williams wrote:

> I've been using POSIX threads for quite some time, having taught myself 
> using "http://centaurus.cs.umass.edu/~wagner/threads_html/tutorial.html". 
>  In this tutorial they use a function called pthread_delay_np.  I just 
> tried to use it, and it appears that my RH box doesn't have it.  I need 
> to make a thread sleep for a given qunatity of time, but a call to sleep 
> seems to cause all the threads in the process to sleep.  The only 
> reference I can find to pthreads_delay_np as it relates specifically to 
> Linux is a VERY old Suse rpm that lists the appropriate man page as a 
> provided file.  Anyone know the issue with pthread_delay_np or how to 
> accomplish an equivalent?
>