fphttpserver: reduce the stack size of the thread spawned for threaded server

Luca Olivetti via fpc-pascal <[email protected]> Mon, 18 May 2026 19:42:09 +0200
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
fpc 3.2.2, for a threaded server this code

constructor TFPHTTPConnectionThread.CreateConnection(AConnection: 
TFPHTTPConnection
   );
begin
   FConnection:=AConnection;
   FreeOnTerminate:=True;
   Inherited Create(False);
end;

creates a thread with the default stack size. I want to reduce it.

I'm already using a class derived from TEmbeddedHttpServer (in turn 
derived from TFPCustomHttpServer) so I could simply override  the 
CreateConnectionThread of TFPCustomHttpServer, which is virtual.

But the original CreateConnectionThread function is


function TFPCustomHttpServer.CreateConnectionThread(Conn: TFPHTTPConnection
   ): TFPHTTPConnectionThread;
begin
    Result:=TFPHTTPConnectionThread.CreateConnection(Conn, 
FConnectionThreadList);
end;


and I don't have access to FConnectionThreadList


what other options do I have?

Bye
-- 
Luca



_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal