This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_cond_timedwait vs pthread_mutex_timedlock


On Monday 04 May 2009 15:26:06 Borislav Trifonov wrote:
> But if the thread can just be woken when a condition occurs, then why is a
> mutex even needed?

waking at the right time does not guarantee exclusion, it just most often 
works out that way.  mutexes however absolutely guarantee exclusion.
-mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]