<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">R0b0t1 <<a href="mailto:r030t1@gmail.com">r030t1@gmail.com</a>> schrieb am Sa., 23. Juni 2018, 18:50:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Saturday, June 23, 2018, Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com" target="_blank" rel="noreferrer">ryan@thealchemistguild.com</a>> wrote:<br>><br>><br>>> On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>> wrote:<br>>><br>>> See also here: <a href="https://www.freepascal.org/docs-html/ref/refse26.html" target="_blank" rel="noreferrer">https://www.freepascal.org/docs-html/ref/refse26.html</a><br>><br>> I had no idea this existed. When was it added?<br>><br>> Regards,<br>>         Ryan Joseph<br>><br><br>I found them one day as well and was confused. The note that they implement TMonitor is helpful. I know of no other uses.<br></blockquote></div><div dir="auto"><br></div><div dir="auto">The TMonitor was a guess by Michael. </div><div dir="auto">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. </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>