mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 15:40:42 +02:00
make async call queue a FIFO (patch by Alexandre Leclerc)
git-svn-id: trunk@10210 -
This commit is contained in:
parent
49b77d57c0
commit
3e63e3f908
@ -911,6 +911,7 @@ type
|
||||
FOnShowHint: TShowHintEvent;
|
||||
FOnUserInput: TOnUserInputEvent;
|
||||
FAsyncCallQueue: PAsyncCallQueueItem;
|
||||
FAsyncCallQueueLast: PAsyncCallQueueItem;
|
||||
FShowHint: Boolean;
|
||||
FShowMainForm: Boolean;
|
||||
FLastMousePos: TPoint;
|
||||
|
@ -788,6 +788,7 @@ begin
|
||||
lItem^.Method(lItem^.Data);
|
||||
Dispose(lItem);
|
||||
end;
|
||||
FAsyncCallQueueLast := nil;
|
||||
end;
|
||||
|
||||
procedure TApplication.DoBeforeFinalization;
|
||||
@ -1561,8 +1562,12 @@ begin
|
||||
New(lItem);
|
||||
lItem^.Method := AMethod;
|
||||
lItem^.Data := Data;
|
||||
lItem^.NextItem := FAsyncCallQueue;
|
||||
FAsyncCallQueue := lItem;
|
||||
lItem^.NextItem := nil;
|
||||
if FAsyncCallQueue = nil then
|
||||
FAsyncCallQueue := lItem
|
||||
else
|
||||
FAsyncCallQueueLast^.NextItem := lItem;
|
||||
FAsyncCallQueueLast := lItem;
|
||||
end;
|
||||
|
||||
procedure TApplication.FreeComponent(Data: PtrInt);
|
||||
|
Loading…
Reference in New Issue
Block a user