httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: Context types in APR.
Date Fri, 07 May 1999 19:33:44 GMT
Ben Hyde wrote:
> I did recieve one private reply to my question for examples
> in other systems.  I've now gone and looked carefully at
> the example I was given and there the "context" is actually
> many "contexts", each one is representing an object upon
> which assorted operations are being done.

I would have done better if the relevant manuals were to hand,
and not buried under hundreds of pounds of flower pots.  (Not
that the manuals are especially good fertiliser.. :-)

> My style of design assumes that there is always an "object
> model" implicit in everything.  It continues to elude my
> thick skull what "object" the context is standing for.
> It would seem to be standing in for a fuzzy union of
> activity/thread/pool/thread-state and globals.

Mmm, how about the Object class in Java? :->

> 1. Is blocking signals an operation on threads, and if
>    so why would it's state be better in the context
>    rather than the thread's state.

I can't answer this one, from lack of knowledge.  I'm barely
thread-aware, though I'm working on it.

> 2. What compelling advantage is worth the cost of
>    passing an additional parameter to every function?

Uniformity of syntax, and complete freedom for all functions
to call whatever else is necessary to get their jobs done.
This allows routines in the call chain to pass it down, and
those that need it can use it, and those that don't can
ignore it (but propagate it).  I have an hypothetical example
in mind, if it comes to that.

> 3. Do pools need to block signals?  If so, do they
>    need a pointer to the thread they reside in?

If you mean do pool operations need to be signal-safe, I think
the answer is yes.  They need to be able to achieve that
signal-safety in a stackable and modular way.  I fail to see
why pools *must* be associated with one and only one thread;
I maintain that they are separate, not subordinate.

> Alternatively maybe you could give me an example of
> a really sweet illustration where it works out nicely.

[sounds of crashing flower pots]  I'll see what I can do.. :-)
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

View raw message