* MOve update of threadqueuetail to critical section

git-svn-id: trunk@30159 -
This commit is contained in:
michael 2015-03-10 08:12:39 +00:00
parent 21fe7616a4
commit af9798c761

View File

@ -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