Class TFitServiceWithThread

Unit

Declaration

type TFitServiceWithThread = class(TFitService)

Description

The server component performing long-term operation in separate thread.

Hierarchy

Overview

Fields

Protected FCurMin: double;
Protected FMainCalcThread: TMainCalcThread;

Methods

Public destructor Destroy; override;
Protected function CreateTaskObject: TFitTask; override;
Public procedure AbortAsyncOper; override;
Public procedure ComputeBackgroundPointsDone; override;
Public procedure ComputeCurveBoundsDone; override;
Public procedure ComputeCurvePositionsDone; override;
Public procedure Done; override;
Public procedure ShowCurMin(Min: double); override;
Public procedure ShowProfile; override;
Public procedure StopAsyncOper; override;
Protected procedure ComputeBackgroundPointsDoneSync;
Protected procedure ComputeCurveBoundsDoneSync;
Protected procedure ComputeCurvePositionsDoneSync;
Protected procedure DestroyMainCalcThread;
Protected procedure DoneSync;
Protected procedure RecreateMainCalcThread(ATask: TThreadMethod; AAllDone: TThreadMethod); override;
Protected procedure ShowCurMinSync;
Protected procedure ShowProfileSync;

Description

Fields

Protected FCurMin: double;

Temporarily saved value of current minimum.

Protected FMainCalcThread: TMainCalcThread;

Pointer to the thread performing long-term method of the component. It is used for synchronization with main thread of the application. If this pointer is not Nil then displaying methods are called synchronously.

Methods

Public destructor Destroy; override;
 
Protected function CreateTaskObject: TFitTask; override;
 
Public procedure AbortAsyncOper; override;

Synchronous termination of long-term operation without calling termination method.

Public procedure ComputeBackgroundPointsDone; override;
 
Public procedure ComputeCurveBoundsDone; override;
 
Public procedure ComputeCurvePositionsDone; override;
 
Public procedure Done; override;
 
Public procedure ShowCurMin(Min: double); override;

All methods must be called synchronously with main application thread, because they update UI. These methods must not call inherited ones, instead call synchronized counterparts of FMainCalcThread.

Public procedure ShowProfile; override;
 
Public procedure StopAsyncOper; override;

Asynchronous termination of long-term operation with calling termination method.

Protected procedure ComputeBackgroundPointsDoneSync;
 
Protected procedure ComputeCurveBoundsDoneSync;
 
Protected procedure ComputeCurvePositionsDoneSync;
 
Protected procedure DestroyMainCalcThread;

Waits for completion of the thread. Do not call from synchonized method, otherwise this will result in deadlock.

Protected procedure DoneSync;
 
Protected procedure RecreateMainCalcThread(ATask: TThreadMethod; AAllDone: TThreadMethod); override;
 
Protected procedure ShowCurMinSync;

These methods are called synchronously from the worker thread. They can't have parameters and call inherited methods to perform actual processing.

Protected procedure ShowProfileSync;
 

Generated by PasDoc 0.15.0.