Topic Path: Symbol Reference > Classes > TIdScheduler Class > TIdScheduler Methods > AcquireYarn Method
ContentsIndexHome
PreviousUpNext
TIdScheduler.AcquireYarn Method

Gets a valid yarn for the scheduler.

function AcquireYarn: TIdYarn; virtual; abstract;

TIdYarn - Thread-based or fiber-based task for the scheduler.

AcquireYarn is an abstract virtual TIdYarn function that specifies the interface used to access a TIdYarn instance for the scheduler. AcquireYarn must be implemented in a descendant class that specializes in creating threads or fibers for the scheduler. 

The TIdYarn return value for the method will include a TIdThreadWithTask or TIdFiberWithTask depending on the type of scheduler in use. The IdYarn instance is added to the ActiveYarns property for subsequent execution. 

Use StartYarn to begin executing the thread or fiber for the client connection task. 

Use TerminateYarn to stop executing the thread or fiber for the client connection task. 

Use TerminateAllYarns to force termination of all TIdYarn instances in ActiveYarns

Use ReleaseYarn to free a yarn in ActiveYarns that has already been terminated.

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