httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: adding is_threaded_mpm variable for config_vars.mk
Date Wed, 23 Apr 2003 16:05:23 GMT
At 12:54 AM 4/23/2003, Stas Bekman wrote:
>When building extensions it's often important to know whether the used mpm is threaded
or not. Certainly, each extension could maintain its own list of threaded mpms, but since
this knowledge is already available during the httpd build, can we add a new variable THREADED_MPM
(similar to scfg->threaded_mpm) to config_vars.mk? or may be IS_THREADED_MPM?

No, you are probably looking for run-time code as in 

    ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded_mpm);
    if (threaded_mpm) {
        apr_thread_mutex_create(&sconf->lock, APR_THREAD_MUTEX_DEFAULT, p);
    }

from mod_mem_cache.c.  As Justin points out, asking the mpm is the
only safe way to test for threading.

Bill



Mime
View raw message