
XThreads.pas
unit
This unit contains definition of ZThread
class, which is similar to TThread in VCL, but can be used to create instances of ZThread
(assigning value to event OnExecute). As well as in VCL, ZThread can be used to derive new
thread class and overriding its Execute method (as it is done for ZFileChange class).
Author : Tim Slusher.
ZThread = class( XChild
);
ZThread properties:
Handle : LongWord;
ThreadID : LongWord;
- PriorityClass : LongWord;
- ThreadPriority : LongWord;
Suspended : Boolean;
Terminated : Boolean;
- Data : Pointer;
ZThread methods:
- constructor Create( CreateSuspended : Boolean );
- function Execute
: integer; virtual;
- procedure Suspend;
- procedure Resume;
- procedure Terminate;
- function WaitFor : LongWord;
ZThread events:
- OnExecute : XOnExecute; ( type XOnExecute = procedure( Sender :
TObject; Data : Pointer; var ReturnValue : Integer ) of object
);
- OnSuspend : XOnEvent;
- OnResume : XOnEvent;
goto XCL page
goto home
page