Internet Direct (Indy) Version 9.0.2 Beta
TIdThreadMgrPool.TerminateThreads
Terminates all running threads and returns them to the thread pool.

procedure TerminateThreads(TerminateWaitTime: integer); override;
Parameters
TerminateWaitTime: integer
Milliseconds before a timeout occurs during thread termination.

Description
TerminateThreads is an overridden procedure in TIdThreadMgrPool that allows the pooled thread manager to terminate all running threads, and return them to the pool for the thread manager. TerminateThreads calles the inherited method to halt execution of all threads using the timeout value specified in TerminateWaitTime.

TerminateThreads extends the ancestor class by locking the internal TThreadList for the TIdThreads in the pool to Start the thread and remove it from the locked thread list. THe locked TTHreadList is unlocked prioer to exiting from the method.