Henri Gomez <[EMAIL PROTECTED]> writes:

> Jeff Trawick wrote:
> > Henri Gomez <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED]
Born in Roswell... married an alien...

Reply via email to