On Mon, 18 May 2026, Luca Olivetti via fpc-pascal wrote:
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?
At this moment, none. The best I can do is add a class variable to allow you to
set its class-type value to a TFPHTTPConnectionThread class descendant,
then that descendant would be used. Then you set this variable at the start.
Another option is to create a ConnectionThreadStackSize variable that would
be used to set the stack size.
Michael.
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal