R0b0t1 <r03...@gmail.com> schrieb am Sa., 23. Juni 2018, 18:50: > On Saturday, June 23, 2018, Ryan Joseph <r...@thealchemistguild.com> > wrote: > > > > > >> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal < > fpc-pascal@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 >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal