<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Dennis <<a href="mailto:dec12@avidsoft.com.hk">dec12@avidsoft.com.hk</a>> schrieb am Sa., 27. Apr. 2019, 05:22:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Sven Barth via fpc-pascal wrote:<br>
> Am 21.04.2019 um 18:22 schrieb Dennis:<br>
>> I am using FPC 3.0.4 Lazarus 2.00 on windows 64<br>
>><br>
>> I created a subclass of TThread and found out that the <br>
>> TThread.OnTerminate event was never called (I already assigned it).<br>
>> Also, I search the source code of TThread in classeh.inc and found <br>
>> that there was no calling of FOnTerminate nor OnTerminate<br>
>><br>
>> Is it supposed to be a dummy place holder?<br>
>> I don't use Delphi any more. Is this behaviour the same as Delphi?<br>
>><br>
>> Thanks in advance.<br>
><br>
> How did you test it? OnTerminate is called using Synchronize so if you <br>
> use a command line program to test it you need to make sure to call <br>
> CheckSynchronize otherwise you'll never see it being called. In a LCL <br>
> program that should work without any further action.<br>
><br>
I am using the debugger to break on the Event assigned to OnTerminate.  <br>
That breakpoint was never reached.<br>
I am using the FpDebug internal Dwart-debugger (beta)<br>
Can you tell me what the code of calling synchronize(OnTerminate) is?  I <br>
cannot find it in the FPC source.<br>
Dennis<br></blockquote></div><div dir="auto"><br></div><div dir="auto">I'm not asking whether you used a debugger, I'm asking whether you used a command line program or a GUI program to test it. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>