[Lazarus] GUI development for web UI

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Dec 1 17:43:50 CET 2010



On Wed, 1 Dec 2010, Marcos Douglas wrote:

> On Wed, Dec 1, 2010 at 1:05 PM, <michael.vancanneyt at wisa.be> wrote:
>>
>> [snip]
>>
>> It never could. There is 1 connection, and all requests go through this connection.
>>
>> A week (or maybe 2) ago, I sent you a private mail about using select()
>> on the connection handle.  This or the use of threads could be used
>> to handle multiple connections.  Maybe look it up and reply :-)
>
> 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.

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.

Michael.


More information about the Lazarus mailing list