Classes.TThread.Execute
From RAD Studio VCL Reference
Contents |
Delphi Information
From Classes.pas
procedure Execute virtual; abstract;
Unit: Classes
Type: method
Visibility: protected
Member Of: TThread
C++ Information
From Classes.hpp
virtual void __fastcall Execute(void);
Unit: Classes
Type: method
Visibility: protected
Member Of: TThread
Description
Provides an abstract or pure virtual method to contain the code which executes when the thread is run.
Override Execute and insert the code that should be executed when the thread runs. Execute is responsible for checking the value of the Terminated property to determine if the thread needs to exit.
A thread executes when Create is called if CreateSuspended set to false, or when Resume is first called after the thread is created if CreateSuspended set to true.
Note: Do not use the properties and methods of other objects directly in the Execute method of a thread. Instead, separate the use of other objects into a separate procedure call, and call that procedure by passing it as a parameter to the Synchronize method.
See Also
Code Samples