apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter N. Lundblad" <pe...@famlundblad.se>
Subject Re: APR feature idea: named global mutex retrieval
Date Fri, 15 Apr 2005 19:45:56 GMT
On Thu, 14 Apr 2005, Greg Hudson wrote:

> My idea is to provide an APR interface like:
>   apr_status_t apr_thread_mutex_get_named(apr_thread_mutex_t **mutex,
>                                           const char *name);
> which would create or fetch from a global hash table a mutex by name.
> APR can use a mutex (presumably one created by apr_initialize) to
> serialize access to the hash table.
This idea is so simple and ellegant! My only concern is about contention
if that function is used much (say every function in a library has to use
it to ensure it was initialized). That might be over-paranoid, however.

I think it is a good idea.


View raw message