delphi – Building Multi threaded TCP/IP Server – Stack Overflow
Posted by jpluimers on 2016/07/21
On the research list: TIdSchedulerOfThreadPool (now that TIdThreadMgrPool is gone).
Need to manage the lifetime of these as I don’t want the threads to live forever, but also don’t want to make the instantiation cost too high.
Most likely I want to wait for them to finish as well upon process exit, so this might be worth a look as well:
- multithreading – How do I wait for all threads in an Indy thread pool to finish – Stack Overflow
- TIdSchedulerOfThreadPool – Google Search
- Migrating from Indy 9 to 10 with Delphi, TIdSchedulerOfThreadPool initialization – Stack Overflow
- Embarcadero Discussion Forums: TIdSchedulerOfThread …
- AtozedSoftware Newsgroup Archive :: atozedsoftware.indy.general :: Thread pooling, server optimization performances.
- Delphi [Indy] Threadmanager benutzen – Delphi-PRAXiS
- delphi – Building Multi threaded TCP/IP Server – Stack Overflow
- The Delphi Geek: Building a connection pool
- SwissDelphiCenter.ch : Introduction to Indy
–jeroen
Source: delphi – Building Multi threaded TCP/IP Server – Stack Overflow






Stijn Sanders said
Ooh, I’ve got IOCP on the to-do list for so long for xxmHttp http://yoy.be/xxm/ but the version I currently have, doesn’t use Indy, does re-use threads (and re-uses sockets) with a limited thread pool (and queues requests if the pool is fully in use)
Ondrej Kelle said
On Windows Server, the most performant/scalable server technique is to use asynchronous sockets with an IOCP/thread pool (ie. not Indy and its blocking sockets).
jpluimers said
Any example code of that? (Delphi or C# preferred)
Ondrej Kelle said
Here’s a great starting point: http://www.coastrd.com/windows-iocp – for code samples, check out the links at the bottom. Cheers and good luck!