httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zeev Suraski <>
Subject Re: work in progress: mpm-3.tar.gz
Date Thu, 17 Jun 1999 23:10:26 GMT
On Thu, 17 Jun 1999, Dean Gaudet wrote:

> We will impose an additional restriction on modules -- if threads are in
> use, they may not make any assumption that the same thread will be used to
> process all phases of a request.  Put another way -- thread local storage
> is useless... and there will be no "thread_init_hook" function to tell
> modules when threads have been created.  This restriction is to give us
> access to hybrid async/sync techniques.  Modules needing information
> persisting between request phases should use request-specific data
> (or connection-specific data).

Ouch, that's a very agressive restriction.  It pretty much requires any
module that uses local storage to be Apache specific, since it would have
to save information in Apache's per-request or per-connection structure
(not to mention it would have to pass pointers to these structures all
over to any function that may require access to these globals, which is

I really urge you to reconsider this.  For PHP 4.0 (Zend), I've written a
platform independent local storage resource manager (that works very well
in the threaded ISAPI/IIS4 environment), but the whole approach will be
renedered completely useless with such restrictions, since it's based on
the thread id, and obviously expects that all steps and hooks are called
within the same thread.  Frankly, with such restrictions, I'm not sure how
something at the complexity of a scripting language can be implemented as
an Apache module.  If it can, it would have to tie the implementation to
Apache very closely (PHP 4.0's implementation actually allows the same DLL
or library to be used for the CGI version, Apache version and IIS version,
with thin server-specific wrappers;  with such restrictions, it doesn't
seem possible). 

If I'm missing something obvious, please enlighten me :)


Zeev Suraski <>
For a PGP public key, finger

View raw message