2013/4/18 Antonio Fortuny <a.fort...@sitasoftware.lu> > First of all change the order of lines 25-26 > inherited Create(False); > FreeOnTerminate := True; > > instead of > FreeOnTerminate := True; > inherited Create(False); > > The, drop the DoExecute procedure and replace it by the Execute procedure. > It is useless to Synchronize a thread's procedure inside itself ! > 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 > our program will execute the procedure Excute only once as there is no > loop. > > > [image: Sita Software] *Antonio Fortuny* > Senior Software engineer > > 220, avenue de la Liberté > L-4602 Niederkorn > Tel.: +352 58 00 93 - 93 > www.sitasoftware.lu > [image: Your IT Partner] > > Thank for the explanation. ;)
-- Silvio Clécio My public projects - github.com/silvioprog
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal