RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerWinSocket.IdleThreads Property

Indicates the number of unused TServerClientThread objects available in the cache.

Pascal
property IdleThreads: Integer;
C++
__property int IdleThreads;

Use IdleThreads to monitor thread cache usage by the listening socket. If IdleThreads often very high, the thread cache is tying up a lot of unused memory storing extra threads. Monitor the ActiveThreads property to determine an appropriate value for ThreadCacheSize

When the ServerType property is stThreadBlocking, each client connection automatically spawns a thread which is added to the cache. As the threads in the cache complete their execution, they become available for reuse, and are counted by IdleThreads. When there are more active threads than ThreadCacheSize, the extra threads are freed when they finish execution instead. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!