Internet Direct (Indy)
Home
PreviousUpNext
TIdSchedulerOfThreadPool.ReleaseYarn Method

Removes a yarn from the list of active yarns.

Pascal
procedure ReleaseYarn(
    AYarn: TIdYarn
); override;
Parameters 
Description 
AYarn 
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.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.