httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apreq-2 layout
Date Thu, 16 Jan 2003 05:44:25 GMT
Joe Schaefer wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>Joe Schaefer wrote:
> 
> 
> [...]
> 
> 
>>>The global struct should only get populated once, at process startup, 
>>>and then remain unchanged (the attributes are all function pointers).
>>>Threading shouldn't be a problem here, should it?
>>
>>what happens if two threads both startup at the same time?
> 
> 
> Threads are subsidiary to processes, right?  By the time threads
> start showing up, the struct should have already been completely
> filled in.

consider:

use Apache::Request;

assuming that the apreq lib is self-contained in Apache::Request, and 
otherwise is not loaded at compile time.

> I don't envision a situation where two threads, running within the 
> same process space, should try running apreq-2 under two different 
> "environments".  Remember, different environments represent 
> different application interfaces for apreq-2: one environment for 
> httpd-2.0, one for httpd-2.2, one for apache-1.3, one for CGI on *nix, 
> etc.

e.g. httpd decides to adopt apreq for input filters. mod_perl uses a 
standalone apreq. Here you have to libs colliding.

>>Also will this work with two sub-system using it in the same process, 
>>where each assigns a different value to it? 
> 
> 
> It's not designed for such uses;  hopefully I've now explained why.
> 
> 
>>Why not using an accessor method to retrieve a copy of the struct?
> 
> 
> We could do that, but right now I don't see the need for it.

True, this could be changed later. But I see no reason why not do it in 
first place. In any case, whatever you decide is fine for now.


__________________________________________________________________
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


Mime
View raw message