<div dir="ltr">2013/4/18 Antonio Fortuny <span dir="ltr"><<a href="mailto:a.fortuny@sitasoftware.lu" target="_blank">a.fortuny@sitasoftware.lu</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div><font face="Helvetica, Arial,
sans-serif">First of all change </font>the order of lines 25-26<br>
inherited Create(False);<br>
FreeOnTerminate := True;<br>
<br>
instead of<br>
FreeOnTerminate := True;<br>
inherited Create(False);<br>
<br>
The, drop the DoExecute procedure and replace it by the Execute
procedure. It is useless to Synchronize a thread's procedure
inside itself !<br>
After the creation, the thread executes immediately the overriden
procedure Execute because, at creation time (inherited
Create(False); ) the thread is created in the state NON SUSPENDED.
The use of the DoExecute is obviously useless<br>
our program will execute the procedure Excute only once as there
is no loop.<br>
<br>
<br>
<div>
<table style="font-family:'Calibri','sans-serif';font-size:8.0pt;color:#002f87;border:0;width:auto">
<tbody>
<tr>
<td style="vertical-align:bottom;padding:40px 20px 25px;border-top:1pt solid #bfbfbf"> <img alt="Sita
Software"> </td>
</tr>
<tr>
<td style="vertical-align:top;padding:5px 20px 0"> <b>Antonio
Fortuny</b><br>
Senior Software engineer<br>
<br>
220, avenue de la Liberté<br>
L-4602 Niederkorn<br>
Tel.: <a href="tel:%2B352%2058%2000%2093%20-%2093" value="+35258009393" target="_blank">+352 58 00 93 - 93</a><br>
<a style="color:#002f87;text-decoration:none" href="http://www.sitasoftware.lu" target="_blank">www.sitasoftware.lu</a><br>
</td>
</tr>
<tr>
<td style="padding:20px 20px 30px;border-bottom:1pt solid #bfbfbf" align="right"> <img alt="Your IT Partner"><br><br> </td></tr></tbody></table></div></div></div></blockquote></div><div class="gmail_extra">
<br></div><div class="gmail_extra" style>Thank for the explanation. ;)</div><div class="gmail_extra"><br></div>--<br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>