apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: APR feature idea: named global mutex retrieval
Date Sun, 17 Apr 2005 20:17:04 GMT
Philip Martin wrote:

>Greg Hudson <ghudson@MIT.EDU> writes:
>
>  
>
>>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.
>>
>>Do people think this is a reasonable feature, or have other ideas for
>>how to solve this sort of problem?
>>    
>>
>
>The obvious answer on a POSIX like system is to allow static
>initialisation of mutexes, this would probably have to be a separate
>type and not an apr_thread_mutex_t.  I don't know whether such a thing
>is possible on Windows, it's absence from APR suggests not.
>  
>
It's not, but Windows does a beautiful job with global named mutexes. :)

-- Brane


Mime
View raw message