TROPooledThread

Overview

The TROPooledThread class is designed to work together with the TROThreadPool class.
This class should not be used directly by users, all necessary actions are performed by the TROThreadPool class.

Location

Instance Methods


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.

constructor Create (TROThreadPool)

Creates a new instance.

constructor Create(aOwner: TROThreadPool)

Parameters:

  • aOwner: Points to the owning thread pool

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

Stop

Stops the thread execution.

procedure Stop

Synchronize

Executes the given method on the main application thread.

procedure Synchronize(Method: TThreadMethod)

Parameters:

  • Method: Points to the method to execute