[fpc-pascal] changes in TThread.OnTerminate in fcp-3.0?
Sven Barth
pascaldragon at googlemail.com
Thu Dec 10 17:23:41 CET 2015
Am 10.12.2015 15:06 schrieb "Henry Vermaak" <henry.vermaak at gmail.com>:
>
> On Thu, Dec 10, 2015 at 02:49:50PM +0100, Sven Barth wrote:
> > Am 10.12.2015 12:15 schrieb "Luca Olivetti" <luca at ventoso.org>:
> > > It's obvious that you cannot free the thread from inside a "normal"
> > Synchronize call, it's no so obvious you cannot do it in the
> > OnTerminate method, so maybe a note could be added in
> > >
> > > http://wiki.freepascal.org/User_Changes_3.0
> > >
> > > The new implementation is clearly better....once you know *not* to
> > > free
> > the thread inside OnTerminate.
> >
> > In all honesty it was never documented either that you *can* free the
> > object from within OnTerminate and in other occurrences you wouldn't
> > free the object that invoked the handler either, right? So why for
> > TThread then? => no need to mention as a change
>
> Is it worthwhile mentioning that OnTerminate gets called with
> Synchronize()? I had to dig into the source to verify this.
That would indeed be worth mentioning, but that would belong in the
documentation then. Would you file a bug report, please?
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20151210/934463e5/attachment.html>
More information about the fpc-pascal
mailing list