httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] Serialize the update to pool.sub_* in destroy_pool
Date Mon, 15 Dec 1997 20:11:24 GMT
Dean Gaudet wrote:
> This breaks down though on timeouts when the longjmp happens to clean
> up everything.  In that case the three subthreads need to be cleaned
> up before their pools can be.  Unfortunately, clear_pool() recurses to
> the deepest pool first before doing a run_cleanups(), and so it would
> try to clean up other_sub_pool before it had run the cleanup that would
> kill off the three subthreads.
> 
> Aha.  Do other_sub_pool = make_sub_pool(NULL), and then take care of
> that with a cleanup registered in pool1.

Glurp. And then if you destroy the subpool you need to also destroy the
cleanup. Presumably you need to serialise this cleanup, too.

Perhaps it would be more elegant to have "top down" cleanups which get
executed before the (existing) "bottom up" cleanups? Thread cleanups
would then be "top down" and, well, presto.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message