httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: thread ID
Date Tue, 06 Mar 2012 10:05:12 GMT
On 06.03.2012 09:25, Massimo Manghi wrote:
> I'm quite aware the code is public, but I thought it would be highly
> recommended to rely on interfaces rather than copying & pasting
> implementations that might change in future.
> Days ago I put on this list a question (that went unanswered) concerning
> the proper way to infer the running mpm name. A core function
> ap_mpm_name exists, but apparently it's not public. I gather from this
> thread the conclusion that reproducing the code of the function could be
> a way to get the information I sought. I don't like it, but at least I
> have a way to get around my problem.

Of course using a public API is much better. In both cases there is none 
available. Copying code gets problematic, when you start to use e.g. 
struct members which are not guaranteed to remain unchanged.

Concerning the MPM name: If you really are trying to find out, whether 
an MPM is multi threaded or not, you can use the public MPM query API. 
It allows to pose questions on the behaviour and config of an MPM and 
should be better than to rely on its name in many cases.

threadId: if you look at log_tid() you will see, that it does not rely 
on any private API or detailed knowledge abut struct internals. So 
copying code here should be stable. At least if I didn't miss something.



View raw message