[fpc-pascal] Support for "class threadvar" sections inside class and record types

Anthony Walter sysrpl at gmail.com
Sat Jun 23 22:55:16 CEST 2018


Much thanks Sven! I'm note sure when I'll use it, but the option is always
nice to have. A small question, since it's available in a class, does
"class threadvar" support generics?

{$mode delphi}

type
  TAnimal<T: TTrainer> = class
  public class threadvar Trainer: T;
  end;

For everyone else, threadvar is the language integrated simplification
of thread
local storage <https://en.wikipedia.org/wiki/Thread-local_storage>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180623/7f5e39fb/attachment.html>


More information about the fpc-pascal mailing list