<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/08/2014 10:20 AM, Mattias
Gaertner wrote:<br>
</div>
<blockquote cite="mid:20141208102034.2ca8b197@limapholos.matflo.wg"
type="cite">
BTW, TThread.Synchronize is hardly a queue.<br>
</blockquote>
Yes there is a Queue (internally in the RTL it's called "<b>ThreadQueue</b>"
)<br>
<br>
This is the source code in the RTL: <br>
<br>
<br>
<br>
<br>
class procedure TThread.Synchronize(AThread: TThread; AMethod:
TThreadMethod);<br>
begin<br>
{ ensure that we have a TThread instance }<br>
if not Assigned(AThread) then<br>
AThread := CurrentThread;<br>
<br>
{ the Synchronize event is instantiated on demand }<br>
AThread.InitSynchronizeEvent;<br>
<br>
AThread.FSynchronizeEntry^.Exception := Nil;<br>
AThread.FSynchronizeEntry^.Method := AMethod;<br>
<b>ThreadQueueAppend</b>(AThread.FSynchronizeEntry);<br>
<br>
AThread.FSynchronizeEntry^.Method := Nil;<br>
AThread.FSynchronizeEntry^.Next := Nil;<br>
end;<br>
<br>
<br>
-Michael<br>
</body>
</html>