mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 04:29:26 +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;
|
Result:=ThreadQueueHead;
|
||||||
if Result<>Nil then
|
if Result<>Nil then
|
||||||
ThreadQueueHead:=ThreadQueueHead^.Next;
|
ThreadQueueHead:=ThreadQueueHead^.Next;
|
||||||
|
if Not Assigned(ThreadQueueHead) then
|
||||||
|
ThreadQueueTail := Nil;
|
||||||
finally
|
finally
|
||||||
System.LeaveCriticalSection(ThreadQueueLock);
|
System.LeaveCriticalSection(ThreadQueueLock);
|
||||||
end;
|
end;
|
||||||
@ -373,9 +375,6 @@ begin
|
|||||||
tmpentry := PopThreadQueueHead;
|
tmpentry := PopThreadQueueHead;
|
||||||
while Assigned(tmpentry) do
|
while Assigned(tmpentry) do
|
||||||
begin
|
begin
|
||||||
{ step 1: update the list }
|
|
||||||
if not Assigned(ThreadQueueHead) then
|
|
||||||
ThreadQueueTail := Nil;
|
|
||||||
{ step 2: execute the method }
|
{ step 2: execute the method }
|
||||||
exceptobj := Nil;
|
exceptobj := Nil;
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user