[Lazarus] Lazarus and Application.ProcessMessages

Michael Schnell mschnell at lumino.de
Mon Dec 8 10:28:47 CET 2014


On 12/08/2014 10:20 AM, Mattias Gaertner wrote:
> BTW, TThread.Synchronize is hardly a queue.
Yes there is a Queue (internally in the RTL it's called "*ThreadQueue*" )

This is the source code in the RTL:




class procedure TThread.Synchronize(AThread: TThread; AMethod: 
TThreadMethod);
   begin
     { ensure that we have a TThread instance }
     if not Assigned(AThread) then
       AThread := CurrentThread;

     { the Synchronize event is instantiated on demand }
     AThread.InitSynchronizeEvent;

     AThread.FSynchronizeEntry^.Exception := Nil;
     AThread.FSynchronizeEntry^.Method := AMethod;
*ThreadQueueAppend*(AThread.FSynchronizeEntry);

     AThread.FSynchronizeEntry^.Method := Nil;
     AThread.FSynchronizeEntry^.Next := Nil;
   end;


-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141208/4b159fe8/attachment-0003.html>


More information about the Lazarus mailing list