RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerSocketThread.Execute Method

Provides the code which executes when the thread is run.

Pascal
procedure Execute; override;
C++
virtual __fastcall Execute();

Use Execute to execute 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.

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.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!