On Fri, 2 May 2014, Michael Schnell wrote:
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.
There is a websockets implementation: search for bauglir websockets.
The two technologies HTTP and websockets are unrelated.
The websocket simply uses the HTTP headers as a start,
but the rest of the protocol is completely different.
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.
I see you are still determined to push your ideas.
Please, Please, please, do everyone a favour and get started on it.
All the time you spent on mails about this by now dwarfs the time needed to
actually implement it.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal