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
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to