[fpc-pascal] fphttpserver: reduce the stack size of the thread spawned for threaded server
Luca Olivetti
luca at ventoso.org
Mon May 18 19:42:09 CEST 2026
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
More information about the fpc-pascal
mailing list