apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: APR pools, mutexes and thread safe allocations
Date Mon, 20 Feb 2017 15:58:10 GMT
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