apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject Re: Pools rewrite [2]
Date Wed, 05 Dec 2001 04:28:49 GMT
Bill Stoddard wrote:


>>If a future async implementation has this same property--i.e.,
>>pools can be "passed" from one thread to another, but a given
>>pool can only have its methods invoked from one thread at a
>>time--then we shouldn't have any problems.
>What happens if a thread exits (under shutdown for instance) and requests are still being
>handled by other threads asynchrounously? Looks as if that threads cleanup will free the
>pool out from under the thread using the pool at the time.

Right, although that problem isn't specific to the freelist.  In
the scenario you're describing, any resource inside the pool, like
an mmap or a file descriptor,  could get clobbered by the thread
that owns the pool while another thread is simultaneously trying to
complete the request associated with the pool.

I think the implication of this is that, in the async model, the
thread that creates a pool for a transaction shouldn't be considered
the owner of the pool--and thus shouldn't take responsibility for
destroying the pool during shutdown.  I look at that as a design
challenge for an async MPM, rather than something that the pools
themselves can solve.


View raw message