Re: Thread starvation with mutex

David Lloyd <[email protected]> Mon, 9 Feb 2004 16:32:24 -0600 (CST)
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
On Mon, 9 Feb 2004, Gary S. Robertson wrote:

> System/library function calls should be engineered to reliably perform
> the operations their names and documentation suggest will occur when
> they are invoked - otherwise they should return with an error.  In this
> case, if the programmer calls pthread_mutex_unlock, then most likely the
> intent is to yield the mutex to the next waiting pthread, if any.

I disagree, I would think that the intent for pthread_mutex_unlock would
be to unlock the mutex according to the way POSIX Threads are supposed to
unlock mutexes.  If I want to yield a mutex to another thread, I would use 
a condition variable.

- D