Topic Path: Symbol Reference > Classes > TIdThread Class > TIdThread Methods > Stop Method
ContentsIndexHome
PreviousUpNext
TIdThread.Stop Method

Halts execution of the thread instance.

procedure Stop; virtual;

Stop is a procedure used to halt execution of the thread instance. Stop uses the value in Stopped to determine if the thread should be altered to reflect the state in StopMode

When Stopped contains False, StopMode is examined for the corresponding action to be performed. smTerminate indicates that the Terminate method is called for the thread instance. 

smSuspend allows the Execute method to suspend execution of the active thread instance. Suspended is not set in Stop becuse it causes immediate suspension of the thread and by-passes the Indy thread execution model. 

In both cases, the Options property is updated to include the value itoStopped. 

Stop performs no action when Stopped contains True.

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