perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: hanging proxy and $base_server_pool->cleanup_register
Date Thu, 09 Dec 2004 01:07:35 GMT
Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>Now cleanup_register() ties a perl interpreter and doesn't release it
>>until that cleanup handler is run. So that call:
>>   $base_server_pool->cleanup_register(sub { Apache::OK });
>>was tieing an interpreter, but wasn't releasing it (since the pool is
>>freed at the child_exit only). And therefore we had a lack of
>>available interpreters and voilĂ  the problem we had that we all saw.
>>
>>I'll fix that shortly in the way suggested in my previous followup.
> 
> 
> ++stas, nice work here!

Thanks :)

So the new function is:

   Apache::ServerUtil::server_shutdown_register_cleanup()

The only minor problem is that I had to duplicate code from APR_Pool.h:

/* XXX: the mpxs_cleanup_t and mpxs_cleanup_run are almost dups with
  * code in APR__Pool.h (minus interpr member which is not used
  * here. They should be moved to modperl_common_util - the problem is
  * modperl_interp_t *, which can't live in modperl_common_* since it
  * creates a dependency on mod_perl. A possible solution is to use
  * void * for that slot and cast it to modperl_interp_t * when used
  */

Anybody wants to tackle this?  I think the pool stuff is still dependent 
on mod_perl, since it has modperl_interp_t in it.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message