httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: mod_status idea
Date Fri, 08 Oct 2004 15:25:09 GMT
On Fri, 8 Oct 2004, Eli Marmor wrote:

> Please check, before adding dependencies on internal data of
> mod_status, if APR_OPTIONAL_HOOK can help here;
> mod_status.c defines a status_hook, and maybe it can be used to help.

Actually, we would want in this case would be an optional function, not an
optional hook.  It's a small distinction, but important: an optional
function is a function that can be called when needed, if present, by a
single caller at a time.  An optional hook is a type of hook, rather than
a single function call: it is a place in the API where a callback can
occur, and multiple modules can register to participate in that hook in a
certain loosely-specified order.  The "optional" part is that the module
that /defines/ the hook (and calls it) might not actually be present
itself, so modules that wish to participate in that hook should not be
broken by that other module's absense.

In other words:
                    callers                       callees
optional hook         ONE                          MANY
optional function     MANY                          ONE


I do like the idea in general by the way.

Hope this helps,
Cliff

Mime
View raw message