Internet Direct (Indy) Version 9.0.2 Beta
|
procedure ReleaseThread(AThread: TIdThread); override;
If the thread has not Terminated, and ThreadPool does not exceed PoolSize, the thread instance will be Stopped and returned to ThreadPool.
If AThread is the current Terminated thread of execution, it is allowed to complete with Terminate. If AThread is not the current thread of execution, AThread.TerminateAndWaitFor is called and the thread is Freed.
ReleaseThread locks and unlocks the ThreadPool list to protect resources while handling the thread instance.