Topic Path: Symbol Reference > Classes > TIdSchedulerOfThreadPool Class > TIdSchedulerOfThreadPool Methods > ReleaseYarn Method
TIdSchedulerOfThreadPool.ReleaseYarn Method

Removes a yarn from the list of active yarns.

procedure ReleaseYarn(
    AYarn: TIdYarn
); override;
Thread-based yarn to be release by the scheduler. 

ReleaseYarn is an overridden method used to remove the TIdYarnOfThread instance in AYarn from the list of yarns in ActiveYarns. ReleaseYarn is called to remove a yarn from the list when its has execution has been terminated. 

AYarn is the thread-based executable task for a client connection returned from the AcquireYarn method. 

ReleaseYarn will return the TIdThreadWithTask instance for the yarn to the internal thread pool when the size of the pool is smaller than PoolSize. If the thread pool is already larger than PoolSize, the thread is terminated (instead of Suspended) and freed.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.