make async call queue a FIFO (patch by Alexandre Leclerc)

git-svn-id: trunk@10210 -
This commit is contained in:
micha 2006-11-16 20:26:39 +00:00
parent 49b77d57c0
commit 3e63e3f908
2 changed files with 8 additions and 2 deletions

View File

@ -911,6 +911,7 @@ type
FOnShowHint: TShowHintEvent;
FOnUserInput: TOnUserInputEvent;
FAsyncCallQueue: PAsyncCallQueueItem;
FAsyncCallQueueLast: PAsyncCallQueueItem;
FShowHint: Boolean;
FShowMainForm: Boolean;
FLastMousePos: TPoint;

View File

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