浏览代码

* WaitFor modified to call CheckSynchronize - to be tested with 3695

git-svn-id: trunk@1671 -
Tomas Hajny 20 年之前
父节点
当前提交
69cc232b0b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      rtl/os2/tthread.inc

+ 3 - 0
rtl/os2/tthread.inc

@@ -230,6 +230,9 @@ function TThread.WaitFor: Integer;
 var
 var
  FH: cardinal;
  FH: cardinal;
 begin
 begin
+ if GetCurrentThreadID = MainThreadID then
+  while not (FFinished) do
+   CheckSynchronize (1000);
  WaitFor := DosWaitThread (FH, dtWait);
  WaitFor := DosWaitThread (FH, dtWait);
 end;
 end;