apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Erenkrantz" <jus...@erenkrantz.com>
Subject Re: Maybe global_mutex breakage isn't a problem
Date Sat, 04 Oct 2008 23:18:48 GMT
On Sat, Oct 4, 2008 at 12:52 PM, Tim Bray <Tim.Bray@sun.com> wrote:
> Um, maybe I'm an idiot.  There is after apr_file_lock(), which seems made to
> order.  Just because I was thinking "mutex" didn't mean I actually needed
> one.

Yup, plus apr_file_lock() has the benefit of anything else on the OS
doing file locking will also fail - with a 'global' mutex, in order
for it to work, it requires a process/thread-level relationship.
(APR, by default, will use SysV semaphores with IPC_PRIVATE, so they
aren't shared across two independent processes.)  -- justin

View raw message