Subj : Re: pthread_mutex_trylock problem To : comp.programming.threads From : AlterX Date : Wed Aug 31 2005 04:21 pm rajendra.stalekar@gmail.com wrote: [cut] > sleep on it and once the thread which acquired releases it the first > thread which is sleeping acquires. > When would we use pthread_mutex_trylock() then? What is the use of such > a function. pthread_mutex_trylock, tries to lock mutex if there isn't locked; if it is, then it return, otherwise, lock mutex. there isn't guarantee about which thread restart (after wait), after mutex unlocked. .