[fpc-devel] fcl-web improvement for apache modules, question
ABorka
fpc-devel at aborka.com
Fri Sep 19 19:13:21 CEST 2008
This is how currently the code looks like for the problematic call:
FCriticalSection.Enter;
try
if (FMaxRequests>0) and (FWorkingWebModules.Count>=FMaxRequests) then
Raise EFPApacheError.Create(SErrTooManyRequests);
if FIdleWebModules.Count > 0 then
begin
II := FIdleWebModules.Count - 1;
while (II>=0) and not (TComponent(FIdleWebModules[II]) is MC) do
Dec(II);
if II >= 0 then
begin
M:=TCustomHTTPModule(FIdleWebModules[II]);
FIdleWebModules.Delete(II);
end;
end;
if (M=nil) then
M:=MC.Create(Self); {<- here comes the problem with the names when
another module needs to be created while this one is still working on a
request}
FWorkingWebModules.Add(M);
finally
FCriticalSection.Leave;
end;
I am gonna play with this a little bit more later today. Somehow we have
to make it work.
AB
Michael Van Canneyt wrote:
>
> On Fri, 19 Sep 2008, ABorka wrote:
>
>> The thing is that for apache modules it is needed to have multiple
>> webmodules created for simultaneous requests coming from multiple people
>> browsing the web server. I was creating some pooling for the web modules
>> in fpapache.pp and simulated 2 concurrent requests when it happened.
>> If we change the name, will the next call find the changed named module
>> for reuse?
>
> No.
>
> Michael.
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list