Philip Martin wrote:
Greg Hudson <[EMAIL PROTECTED]> 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
