[fpc-pascal] Support for "class threadvar" sections inside class and record types
Sven Barth
pascaldragon at googlemail.com
Sat Jun 23 23:24:26 CEST 2018
R0b0t1 <r030t1 at gmail.com> schrieb am Sa., 23. Juni 2018, 18:50:
> On Saturday, June 23, 2018, Ryan Joseph <ryan at thealchemistguild.com>
> wrote:
> >
> >
> >> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal <
> fpc-pascal at lists.freepascal.org> wrote:
> >>
> >> See also here: https://www.freepascal.org/docs-html/ref/refse26.html
> >
> > I had no idea this existed. When was it added?
> >
> > Regards,
> > Ryan Joseph
> >
>
> I found them one day as well and was confused. The note that they
> implement TMonitor is helpful. I know of no other uses.
>
The TMonitor was a guess by Michael.
Threadvars themselves have many uses: the per thread heap management that
FPC's heap uses, one output file per thread, so that StdOut doesn't cross,
the current TThread instance using TThread.CurrentThread (which Delphi
probably implemented using a private class threadvar while for FPC I used a
global threadvar in the implementation section) and so on.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180623/a5bc90bd/attachment.html>
More information about the fpc-pascal
mailing list