Internet Direct (Indy)
Home
PreviousUpNext
TIdThread.Stop Method

Halts execution of the thread instance.

Pascal
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.

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.