B
buff
Unregistered / Unconfirmed
GUEST, unregistred user!
主程序(Form):
var
th1,th2,th3,th4,th5:TmyThread;
begin
Th1 :=Tmythread.create(memo1);
Th2 :=Tmythread.create(memo1);
Th3 :=Tmythread.create(memo1);
Th4 :=Tmythread.create(memo1);
Th5 :=Tmythread.create(memo1);
end;
Tmythread:
//包含一个FORM2(不是主Form)
procedure Tmythread.updateInfo;
begin
//这个地方一直处理事情,到线程终止
end;
procedure Tmythread.Execute;
begin
inherited;
Synchronize(upDateInfo);
end;
constructor Tmyht.Create(Memo: Tmemo;
ini: Tinifile;uid,dx:integer;No:boolean);
begin
Fmemo :=Memo;
Freeonterminate :=true;
inherited create(false);
end;
//form2是一个窗体,只有几个非可视的vcl
问题在于,这样以后,th1执行,th2,-th5,都不执行?
如果加上th2.execute;就只有th2执行,为什么?
各位大虾帮个忙呀,急呀!
var
th1,th2,th3,th4,th5:TmyThread;
begin
Th1 :=Tmythread.create(memo1);
Th2 :=Tmythread.create(memo1);
Th3 :=Tmythread.create(memo1);
Th4 :=Tmythread.create(memo1);
Th5 :=Tmythread.create(memo1);
end;
Tmythread:
//包含一个FORM2(不是主Form)
procedure Tmythread.updateInfo;
begin
//这个地方一直处理事情,到线程终止
end;
procedure Tmythread.Execute;
begin
inherited;
Synchronize(upDateInfo);
end;
constructor Tmyht.Create(Memo: Tmemo;
ini: Tinifile;uid,dx:integer;No:boolean);
begin
Fmemo :=Memo;
Freeonterminate :=true;
inherited create(false);
end;
//form2是一个窗体,只有几个非可视的vcl
问题在于,这样以后,th1执行,th2,-th5,都不执行?
如果加上th2.execute;就只有th2执行,为什么?
各位大虾帮个忙呀,急呀!