S
systermman
Unregistered / Unconfirmed
GUEST, unregistred user!
我的多线程是这样子创建的,如下:
FthreadList := TThreadList.Create;
for li:=Low(gPosList) to High(gPosList)do
begin
FtUpLoad:= TUpLoad.Create;
FthreadList.Add(FtUpLoad);
end;
with FthreadList.LockListdo
try
for li:= 0 to Count-1do
begin
TUpLoad(Items[li]).Resume;
//重新唤起线程进行操作
TUpLoad(Items[li]).Findex := li;
TUpLoad(Items[li]).ConStr := con1.ConnectionString;
end;
finally
FthreadList.UnlockList;
end;
怎么来中途关闭窗体的情况下,关闭每一个正在运行的线程。
FthreadList := TThreadList.Create;
for li:=Low(gPosList) to High(gPosList)do
begin
FtUpLoad:= TUpLoad.Create;
FthreadList.Add(FtUpLoad);
end;
with FthreadList.LockListdo
try
for li:= 0 to Count-1do
begin
TUpLoad(Items[li]).Resume;
//重新唤起线程进行操作
TUpLoad(Items[li]).Findex := li;
TUpLoad(Items[li]).ConStr := con1.ConnectionString;
end;
finally
FthreadList.UnlockList;
end;
怎么来中途关闭窗体的情况下,关闭每一个正在运行的线程。