You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2002/03/13 10:12:58 UTC
need to export status_init from mod_status/scoreboard
status_init() in mod_status initializes status_flags, server_limit and
thread_limit. This is all nice for mod_status since it gets loaded
before any threads are started. Under mod_perl Apache::Scoreboard (the
Perl interface for scoreboard) can be loaded directly by the spawned
threads. Therefore to avoid race condition one has to handle this with
apr_thread_init_once, add the logic for prefork and you end up with an
ugly code.
Can we change mod_status or scoreboard to export these variables similar
to ap_scoreboard_image or export functions that will return these
variables, which will tremendously simplify things?
I'll create and post a patch if you think it's a goodness. If so please
tell me the preferred way to do this.
also any chance somebody will respond/commit my other
scoreboard/mod_status patches I've sent earlier?
Thanks
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: need to export status_init from mod_status/scoreboard
Posted by Stas Bekman <st...@stason.org>.
Aaron Bannert wrote:
> On Wed, Mar 13, 2002 at 05:12:58PM +0800, Stas Bekman wrote:
>
>>status_init() in mod_status initializes status_flags, server_limit and
>>thread_limit. This is all nice for mod_status since it gets loaded
>>before any threads are started. Under mod_perl Apache::Scoreboard (the
>>Perl interface for scoreboard) can be loaded directly by the spawned
>>threads. Therefore to avoid race condition one has to handle this with
>>apr_thread_init_once, add the logic for prefork and you end up with an
>>ugly code.
>>
>>Can we change mod_status or scoreboard to export these variables similar
>>to ap_scoreboard_image or export functions that will return these
>>variables, which will tremendously simplify things?
>>
>
> +1 for accessor functions.
regarding status_flags, should the accessor return a copy of the whole
structure or just a pointer to it?
where should the accessors reside: scoreboard or mod_status?
Assuming that someone may want to use them without loading mod_status
I think scoreboard is the right place and mod_status itself can use these.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: need to export status_init from mod_status/scoreboard
Posted by Aaron Bannert <aa...@clove.org>.
On Wed, Mar 13, 2002 at 05:12:58PM +0800, Stas Bekman wrote:
> status_init() in mod_status initializes status_flags, server_limit and
> thread_limit. This is all nice for mod_status since it gets loaded
> before any threads are started. Under mod_perl Apache::Scoreboard (the
> Perl interface for scoreboard) can be loaded directly by the spawned
> threads. Therefore to avoid race condition one has to handle this with
> apr_thread_init_once, add the logic for prefork and you end up with an
> ugly code.
>
> Can we change mod_status or scoreboard to export these variables similar
> to ap_scoreboard_image or export functions that will return these
> variables, which will tremendously simplify things?
+1 for accessor functions.
-aaron