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

Starts execution of the task for a scheduled thread or fiber.

procedure StartYarn(
    AYarn: TIdYarn; 
    ATask: TIdTask
); override;
Parameters 
Description 
AYarn 
Thread-based yarn to be executed.
 
ATask 
Task context for the client connection. 

StartYarn is an overridden procedure in TIdSchedulerOfThread used to begin execution of the thread using the task context for a client connection to the server. 

StartYarn ensures that AYarn is cast to a TIdYarnOfThread instance, and assigns the executeable task for the client connection in ATask to the task in the yarn. Execution of the thread is begun by calling the Start method in the TIdThreadWithTask instance. 

StartYarn is used in TIdTCPServer to begin execution of the task context for a client connection after accepting a connection request in a listener thread. 

Use TerminateYarn to halt execution of the yarn and its executable task in the scheduler.

TIdYarnOfThread 

TIdThreadWithTask 

TIdTCPServer.Contexts 

TIdTCPServer.ContextClass 

TIdListenerThread

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