Hi

George Petasis is working on a threaded version of mod_rivet that could
work for both the WinNT MPM and the Unix worker MPM (along with the
'prefork' MPM).  

Many issues have been clarified lately, including the way Apache threads
work with the worker MPM and WinNT MPM. Even though threads share the
address space of their parent process, Tcl interpreters work
consistently only within the thread that created them, ruling out the
possibility of creating a process wide pool of Tcl
interpreters/Channels. A pool of Tcl resources could perhaps have
mitigated the problem of having a largely redundant number of
interpreters sitting around, as a child process is never using more than
one interp at a time, when SeparateVirtualInterps is on.

  Tcl has its own robust 'apartment' thread model. When dealing with the
Apache worker MPM the perspective is different: it's not about Tcl
managed threads, but about Apache managed threads embedding Tcl
interpreters. The natural way to approach the problem would be to create
thread private interpreters in the same way we do for child processes,
but threads in the worker MPM are part of a hybrid multiprocessing
architecture and Apache doesn't provide initialization and termination
hooks for them.

mod_perl solution was to create a pool of private threads to which the
Apache threads post through a queue the jobs (request parameters) the
private threads must consume to generate content.  Ther's still lots of
things to understand but I think this is at the moment the best
candidate as solution to work on.

 George's doing a deep reorganization of the code and probably
mod_rivet.c will eventually be broadly rewritten in the process.  

 -- Massimo




---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to