有这么一个线程,执行体是这样的
procedure TTestThread.Execute;
begin
while not Self.Terminated do
begin
Windows.Sleep(60000); // 1 minutes
Self.DoSth;
end;
end;就是每隔一个分钟做点事,怎样在它1分钟Sleep的时候,打断Sleep,提前一次做Self.DoSth;说白了,就是如何唤起slept thread
procedure TTestThread.Execute;
begin
while not Self.Terminated do
begin
Windows.Sleep(60000); // 1 minutes
Self.DoSth;
end;
end;就是每隔一个分钟做点事,怎样在它1分钟Sleep的时候,打断Sleep,提前一次做Self.DoSth;说白了,就是如何唤起slept thread
线程唤醒:QueueUserAPC
http://61.186.252.131/Expert/topic/1002/1002079.xml?temp=.7805292
http://61.186.252.131/Expert/topic/2287/2287143.xml?temp=.6874658
http://www.book23.com/data/web5304/20050228/20050228__3584129.html