浏览代码

* ffinish patch

git-svn-id: trunk@2141 -
marco 20 年之前
父节点
当前提交
1318b959e0
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      rtl/linux/tthread.inc

+ 2 - 1
rtl/linux/tthread.inc

@@ -205,7 +205,8 @@ end;
 
 destructor TThread.Destroy;
 begin
-  if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then
+  if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) 
+	and not fFinished then		
     raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
 
   // if someone calls .Free on a thread with