Today, we are learning another obscure syntax from Alister Christie of Learn Delphi TV. In this new Learn Delphi Video, he will learn more about the ThreadVar and how does it differ from the local variables? It is interesting to note that the code with the threadvar is invalid syntax. A threadvar needs to have a unit scope rather than local scope.
According to the video, a thread-local variable has separate instances for each thread in the process. There is a one-to-one mapping between instances of the variable and threads. If you haven’t heard or used ThreadVar before, this Learn Delphi video will explain every detail you need to know. Feel free to watch the video above and learn more about this obscure syntax in Delphi and windows application development.
Design. Code. Compile. Deploy.
Start Free TrialUpgrade Today
Free Delphi Community EditionFree C++Builder Community Edition