apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] Re: apr_proc_mutex is broken
Date Tue, 19 Nov 2002 18:48:05 GMT
<rbb@rkbloom.net> writes:

> This would be a bad design change IMNSHO.  The library has no business
> deciding when a mutex is destroyed, that is the role of the application
> that created the mutex.  It isn't too hard to imagine a situation where a
> mutex is created in the parent process, but the child processes are the
> only ones that know anything at all about when it is safe to destroy it.
> The app must be the thing that decides when to close the mutex.

Perhaps I'm missing something obvious, but the app doesn't seem to
have much control over when the mutex is destroyed.  Either it calls
apr_terminate() or not, which isn't a very nice way to control it.

An app could do what Apache does and allocate the mutex from a pool
which is never cleaned up (app doesn't call apr_terminate() but is
careful to clean up all pools except for the one with the mutex in
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

View raw message