System.Win.ScktComp.TServerWinSocket.IdleThreads

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property IdleThreads: Integer read GetIdleThreads;

C++

__property int IdleThreads = {read=GetIdleThreads, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TServerWinSocket

Description

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

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.

See Also