[fpc-pascal] TThread.OnTerminate never called
pascaldragon at googlemail.com
Sat Apr 27 07:20:23 CEST 2019
Dennis <dec12 at avidsoft.com.hk> schrieb am Sa., 27. Apr. 2019, 05:22:
> Sven Barth via fpc-pascal wrote:
> > Am 21.04.2019 um 18:22 schrieb Dennis:
> >> I am using FPC 3.0.4 Lazarus 2.00 on windows 64
> >> I created a subclass of TThread and found out that the
> >> TThread.OnTerminate event was never called (I already assigned it).
> >> Also, I search the source code of TThread in classeh.inc and found
> >> that there was no calling of FOnTerminate nor OnTerminate
> >> Is it supposed to be a dummy place holder?
> >> I don't use Delphi any more. Is this behaviour the same as Delphi?
> >> Thanks in advance.
> > How did you test it? OnTerminate is called using Synchronize so if you
> > use a command line program to test it you need to make sure to call
> > CheckSynchronize otherwise you'll never see it being called. In a LCL
> > program that should work without any further action.
> I am using the debugger to break on the Event assigned to OnTerminate.
> That breakpoint was never reached.
> I am using the FpDebug internal Dwart-debugger (beta)
> Can you tell me what the code of calling synchronize(OnTerminate) is? I
> cannot find it in the FPC source.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal