httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <>
Subject Re: Context types in APR.
Date Sat, 08 May 1999 00:53:03 GMT
Rodent of Unusual Size <Ken.Coar@Golux.Com> writes:

> Ben Hyde wrote:
> > 
> > This is the classic end to end issue.  At what layer in the
> > onion is the multiplexing done?  It doesn't belong in the pool
> > it belongs on the data structure being shared.
> No, it belongs on the structure to which access needs to be
> synchronised.  

I don't understand this, I say "it belongs on the data structure
being shared" and you san "structure to which access needs to
be syncrhonized"  -- isn't that the saying the same thing?

> So I back off my earlier query and submit
> instead that the lock-or-not bit belongs in the pool structure.
> It's the pool routines that will be doing the synchronising.
> When you create a pool that doesn't require synchronising,
> such as one associated with a thread object, the bit in the
> new pool structure gets set accordingly.

It's not that you couldn't put synch on the pool operations.
It's that in practice it's not an good design, because the
data structure for which the allocations is being done often
will need syncronization so you can just leave it to that
data structure, and create a pool for that data type.

My point was that you don't need two mux you only need one.

> Proper treatment of this wrt signals requires some thought.

We block signals in pools when they allocated from the shared
data structure holding large blocks of data.  Since it's short
duration that's fine.  We also syncrhonize around the data
structure that holds those blocks.

 - ben

View raw message