mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 13:59:28 +02:00
* MOve update of threadqueuetail to critical section
git-svn-id: trunk@30159 -
This commit is contained in:
parent
21fe7616a4
commit
af9798c761
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user