在线程A、B中用CreateEvent创建同名事件SameEvent,
A:=ThreadA.Create(true,...);
B:=ThreadA.Create(true,...);
A.Resume;
B.Resume;
ThreadA.Execute
begin
while not terminateddo
begin
end;
///A线程执行完毕通知线程B运行
if terminated then
SetEvent(....)
end;
ThreadB.Execute
var
WaitResult:integer;
begin
while not terminateddo
begin
////无限期等待SameEvent事件
WaitResult:=WaitForSingleObject(SameEvent事件的handle,Infinite);
if WaitResult=Wait_Object_0 then
..........
..........
end;
end;
具体程序可按上面思路完成