فهرست منبع

* MOve update of threadqueuetail to critical section

git-svn-id: trunk@30159 -
michael 10 سال پیش
والد
کامیت
af9798c761
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      rtl/objpas/classes/classes.inc

+ 2 - 3
rtl/objpas/classes/classes.inc

@@ -345,6 +345,8 @@ begin
       Result:=ThreadQueueHead;
       if Result<>Nil then
         ThreadQueueHead:=ThreadQueueHead^.Next;
+      if Not Assigned(ThreadQueueHead) then
+        ThreadQueueTail := Nil;
     finally
       System.LeaveCriticalSection(ThreadQueueLock);
     end;
@@ -373,9 +375,6 @@ begin
   tmpentry := PopThreadQueueHead;
   while Assigned(tmpentry) do
     begin
-    { step 1: update the list }
-    if not Assigned(ThreadQueueHead) then
-      ThreadQueueTail := Nil;
     { step 2: execute the method }
     exceptobj := Nil;
     try