httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: APR pools, mutexes and thread safe allocations
Date Mon, 20 Feb 2017 16:03:38 GMT
apr_pool_create_ex_debug(), yes.

> On Feb 20, 2017, at 11:00 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> 
> Well, this is for debug mode only I guess.
> 
> On Mon, Feb 20, 2017 at 4:59 PM, Jim Jagielski <jim@jagunet.com> wrote:
>> Please READ apr_pools.c... Search for '->mutex'
>> 
>>> On Feb 20, 2017, at 10:58 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
>>> 
>>> On Mon, Feb 20, 2017 at 4:43 PM, Jim Jagielski <jim@apache.org> wrote:
>>>> You are confusing pool mutexes with allocator mutexes...
>>> 
>>> I'm not sure to understand, there is no pool mutex per se currently,
>>> the mutex (if any) used by the pool is its allocator's.
>>> 
>>> So as Brane says, if one sets a mutex to the allocator of a pool
>>> because (s)he wants pool_create/destroy() to be thread-safe, it does
>>> not necessarily wants the same for palloc() and friends (e.g. the pool
>>> is used by a single thread).
>>> 
>>> I think we should not (re)use the allocator mutex if we want the pool
>>> allocations to be thread-safe, but precisely have a separate pool
>>> mutex.
>> 


Mime
View raw message