Topic Path: Symbol Reference > Classes > TIdSchedulerOfThread Class > TIdSchedulerOfThread Methods > TerminateYarn Method
ContentsIndexHome
PreviousUpNext
TIdSchedulerOfThread.TerminateYarn Method

Halts execution of the thread-based task for a client connection.

procedure TerminateYarn(
    AYarn: TIdYarn
); override;
Parameters 
Description 
AYarn 
Thread or fiber in the scheduler to be terminated. 

TerminateYarn is an overridden procedure in TIdSchedulerOfThread used to halt execution of the thread-based task for a client connection to a server. 

TerminateYarn casts AYarn to a TIdYarnOfThread instance, as used in the scheduler, to access the thread for the task context. If the thread is suspended, both the thread and its yarn in the scheduler are freed. If the thread has been terminated, the associated yarn will be freed when the thread is freed. 

TerminateYarn is used in TerminateAllYarns to halt execution of all TIdYarnOfThread instances in ActiveYarns

Use AcquireYarn to get a new thread-based executable task for a client connection. 

Use StartYarn to begin execution of the thread-based yarn in the scheduler.

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