[fpc-pascal] FCGI MultiThreaded

Michael Schnell mschnell at lumino.de
Fri May 2 11:59:22 CEST 2014


On 05/02/2014 11:05 AM, Michael Van Canneyt wrote:
>
>>
>>  does anyone know if the TCustomFCgiApplication is multithreaded ?
>
> No, it is not.
>
> It's on my todo list, but has low priority.
>

While enhancing TCustomFCgiApplication regarding threads, 
TThread.Synchronize, TThread.Queue would need to be usable.

I suppose (in FCGI or similar) a "Thread" should be able to be kept 
running while the Browser is disconnected (no HTTP request running).

IMHO a very interesting issue here is Server to Browser signaling. In 
the past I learned that the straight CGI-compatible method ("Comet" and 
friends) does not work decently but nowadays, "WEBSockets" is supported 
by all relevant browsers and can be used for this.



TCustomFCgiApplication is used in Lazarus (wbelazideinterf.pas).

While enhancing it regarding threads, IMHO it would be a most sensible 
goal to do a Lazarus "Application type" / "WidgetType", that 
additionally to TThread.Queue, allows for TTimer and 
Application.QueueAsyncCall.

-Michael



More information about the fpc-pascal mailing list