apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: remove nested mutexes?
Date Fri, 12 Sep 2003 05:12:49 GMT

On Thursday, September 11, 2003, at 10:02  PM, Greg Stein wrote:
> I've written applications like this. One thread will create a mutex, 
> stash
> that away in a global, or somesuch, and then lock the thing *twice*. 
> When
> another thread wants the first one to resume, it unlocks the mutex.

Oh, and FWIW, I'm proposing we get rid of nested (aka recursive) 
mutexes,
which is when the same thread can lock a mutex over and over w/o
deadlocking. In what we call non-nested mutexes, you get the default
posix behavior, which is the scenario you described above (whenever
a thread tries to lock an already-acquired mutex, it will block).

-aaron


Mime
View raw message