W dniu 2010-12-02 09:25, [email protected] pisze:


On Thu, 2 Dec 2010, Dariusz Mazur wrote:


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) application.

I understand this is the easy way.

But you don't need this architecture to do that. As long as a single request
runs in a single thread, there is no problem with decoupling sessions and
threads, and still be able to keep everything in memory.

I dont understand.
I parse single request in single thread (for each request new thread)
and what can I do (other) with sessions?


--
  Darek





--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to