[Lazarus] GUI development for web UI

Dariusz Mazur darekm at emadar.com
Thu Dec 2 00:04:38 CET 2010

>> ExtPascal uses threads to handle multiple connections. I remember you
>> don't accept this way, right? BTW, what is there wrong if ExtPascal
>> uses threads?
> I accept using threads, but not the way ExtPascal does it. Threads 
> should be
> optional. In extpascal, the thread is equal to the session: if you 
> have many
> sessions, the application will create as many threads as there are 
> sessions.

I use different architecture: each session has own thread and each 
connection has own thread. Sessions are separated from connections and 
communicate via FIFO queue.
Session runs whole life time in the same thread. With this i can use 
modal form and thread var in the same manner, as normal (desktop) 

> Under normal circumstances you would have a fixed (or limited) thread 
> pool, and each request is  handled by a free thread in the pool. So 
> requests of
> a session can (and will) be handled by different threads.

> In ExtPascal, it is impossible to separate the thread from the session.
> This has the advantage of being simple, but doesn't scale, and creates 
> unneeded dependencies between different parts of the software.

that is next point


More information about the Lazarus mailing list