[fpc-devel] fcl-web improvement for apache modules, question
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Sep 19 19:19:39 CEST 2008
On Fri, 19 Sep 2008 10:13:21 -0700
ABorka <fpc-devel at aborka.com> wrote:
> 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}
M.Name:=''; // or to a unique name
> 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.
Mattias
More information about the fpc-devel
mailing list