perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: hanging proxy and $base_server_pool->cleanup_register
Date Thu, 09 Dec 2004 01:07:35 GMT
Joe Schaefer wrote:
> Stas Bekman <> 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:


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     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message