TROThread
Overview
The TROThread class is a base class used by the Remoting SDK to implement an
asynchronous execution.
The Super Channels use descendants of the TROThread class to enable true asynchronous calls and server callbacks. Event Sinks and Server Callbacks use them as well.
Location
- Unit: uROThread.pas
- Ancestry: TThread | TROInitializedThread | TROThread
constructor Create (Boolean, string)
Initializes the instance with the given arguments.
constructor Create(aCreateSuspended: Boolean; const aName: string)
Parameters:
- aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
- aName: Become the value of the Name property.
constructor Create (Boolean) (declared in TROInitializedThread)
Creates a new class instance (standard thread class constructor).
constructor Create(CreateSuspended: Boolean)
Parameters:
- CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.
DoTerminate protected override
procedure DoTerminate
Execute protected override (declared in TROInitializedThread)
This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.
procedure Execute
Free reintroduce
procedure Free
Name protected
Sets a readable name for the thread.
property Name: string read
SetName protected
procedure SetName(const aName: string)
Parameters:
- aName:
TerminateWaitFor virtual
Utility method that combines a call to Terminate with a subsequent call to WaitFor.
procedure TerminateWaitFor
WaitFor reintroduce
Blocks the current thread until the current event receives a signal.
function WaitFor: Cardinal
Name protected
Sets a readable name for the thread.
property Name: string read
constructor Create (Boolean, string)
Initializes the instance with the given arguments.
constructor Create(aCreateSuspended: Boolean; const aName: string)
Parameters:
- aCreateSuspended: If true, Execute won’t be called until after Resume is called; if false, Execute is called immediately.
- aName: Become the value of the Name property.
constructor Create (Boolean) (declared in TROInitializedThread)
Creates a new class instance (standard thread class constructor).
constructor Create(CreateSuspended: Boolean)
Parameters:
- CreateSuspended: When set to true, this parameter allows to create a thread that will not be started right after it is created. This allows to do some thread class configuration before the execution begins.
DoTerminate protected override
procedure DoTerminate
Execute protected override (declared in TROInitializedThread)
This method will be executed on the background thread, and should contain the user code. In this class, the Execute method must not be overridden in descendant classes, override IntExecute instead.
procedure Execute
Free reintroduce
procedure Free
SetName protected
procedure SetName(const aName: string)
Parameters:
- aName:
TerminateWaitFor virtual
Utility method that combines a call to Terminate with a subsequent call to WaitFor.
procedure TerminateWaitFor
WaitFor reintroduce
Blocks the current thread until the current event receives a signal.
function WaitFor: Cardinal