httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: module and threads
Date Mon, 02 Dec 2002 22:21:27 GMT
Henri Gomez <hgomez@apache.org> writes:

> Jeff Trawick wrote:
> > Henri Gomez <hgomez@apache.org> writes:
> >
> >>The module should create some threads at startup time,
> >>these threads will handle dbm and IO operations and
> >>they should be kept running after the module initialisation.
> >>
> >>Also I'll need to access some of these threads information
> >>when the module will be called (via some specials URIs),
> >>and wonder if the datas created at init time will be still
> >>available.
> > yes it will still be available, assuming you use the right pool...
> > look at post_config hook for allocating global resources and
> > child_init hook for allocating per-child-process resources
> > the pool passed to either of these functions will almost always have
> > the lifetime you need

> Did there is today a module in Apache 2.0 which use this kind
> of use of threads ?

Normal modules that come with Apache 2 aren't multi-threaded;
otherwise they wouldn't work across all platforms.

But worker MPM (server/mpm/worker/worker.c) is an example of a
multithreaded MPM module, and is an example of certain uses of APR for
thread handling.  There are other multi-threaded MPMs as well.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message