S
systermman
Unregistered / Unconfirmed
GUEST, unregistred user!
我不知道线程数组中最后一个线程何时停止,如果知道何时停止的话,我要做的操作是唤起另一个单独的线程。不知道怎么处理,高手帮帮忙!!!我的线程组是这么处理的,如下:
gThreadList := TThreadList.Create;
for li:=Low(gPosList) to High(gPosList)do
begin
FtUpLoad:= TUpLoad.Create;
//FtUpLoad.Findex := li;
gThreadList.Add(FtUpLoad);
end;
with gThreadList.LockListdo
try
for li:= 0 to Count-1do
begin
TUpLoad(Items[li]).Resume;
//重新唤起线程进行操作
TUpLoad(Items[li]).Findex := li;
end;
gThreadList := TThreadList.Create;
for li:=Low(gPosList) to High(gPosList)do
begin
FtUpLoad:= TUpLoad.Create;
//FtUpLoad.Findex := li;
gThreadList.Add(FtUpLoad);
end;
with gThreadList.LockListdo
try
for li:= 0 to Count-1do
begin
TUpLoad(Items[li]).Resume;
//重新唤起线程进行操作
TUpLoad(Items[li]).Findex := li;
end;