소스 검색

* applied r2098 change regarding threads destroying themselves to
the other bsd variants

git-svn-id: trunk@2158 -

Jonas Maebe 20 년 전
부모
커밋
f92f8501ff
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      rtl/darwin/tthread.inc
  2. 1 1
      rtl/netbsd/tthread.inc
  3. 1 1
      rtl/openbsd/tthread.inc

+ 1 - 1
rtl/darwin/tthread.inc

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

+ 1 - 1
rtl/netbsd/tthread.inc

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

+ 1 - 1
rtl/openbsd/tthread.inc

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