|
Suspend/resume thread
To set thread in suspend/resume status, use Suspend/Resume property of TThread type.
type
TTestThread = class(TThread)
private
j: Integer;
protected
procedure GetInfo;
procedure Execute; override;
end;
...
var
NewThread: TTestThread;
...
procedure TForm1.Button2Click(Sender: TObject);
begin
NewThread.Resume;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
NewThread.Suspend;
end;
- Related topics
-
Synchronize thread with application
Create/destroy thread
Set/get total thread priority
- For more
-
Delphi Help
- Download source
|