瀏覽代碼

- removed no longer used tthread.FSuspendedExternal

git-svn-id: trunk@28963 -
Jonas Maebe 10 年之前
父節點
當前提交
79a40547ca
共有 2 個文件被更改,包括 1 次插入11 次删除
  1. 0 1
      rtl/objpas/classes/classesh.inc
  2. 1 10
      rtl/unix/tthread.inc

+ 0 - 1
rtl/objpas/classes/classesh.inc

@@ -1611,7 +1611,6 @@ type
     // see tthread.inc, ThreadFunc and TThread.Resume
     FSem: Pointer;
     FInitialSuspended: boolean;
-    FSuspendedExternal: boolean;
     FSuspendedInternal: longbool;
     FThreadReaped: boolean;
 {$endif}

+ 1 - 10
rtl/unix/tthread.inc

@@ -153,7 +153,6 @@ begin
     raise EThread.create('Semaphore init failed (possibly too many concurrent threads)');
   WRITE_DEBUG('thread ', ptruint(self), ' created semaphore ', ptruint(FSem));
   FSuspended := CreateSuspended;
-  FSuspendedExternal := false;
   FThreadReaped := false;
   FInitialSuspended := CreateSuspended;
   FFatalException := nil;
@@ -228,8 +227,6 @@ begin
   else
     begin
       Raise EThread.create('Suspending one thread from inside another one is unsupported (because it is unsafe and deadlock prone) by *nix and posix operating systems');
-//      FSuspendedExternal := true;
-//      SuspendThread(FHandle);
     end;
 end;
 
@@ -241,7 +238,7 @@ begin
       WRITE_DEBUG('resuming thread after TThread construction',ptruint(self));
       SemaphorePost(FSem);
     end
-  else if (not FSuspendedExternal) then
+  else
     begin
       if FSuspended and
          { don't compare with ord(true) or ord(longbool(true)), }
@@ -252,12 +249,6 @@ begin
           SemaphorePost(FSem);
         end
     end
-  else
-    begin
-      raise EThread.create('External suspending is not supported under *nix/posix, so trying to resume from from an external suspension should never happen');
-//      FSuspendedExternal := false;
-//      ResumeThread(FHandle);
-    end;
 end;