[Lazarus] A few questions on threads

Michael Schnell mschnell at lumino.de
Tue Oct 4 12:59:32 CEST 2011


On 10/04/2011 12:26 PM, Frank Church wrote:
> Isn't it possible to have add new fields to your thread that can be 
> interrogated?
Of course you can add any variables and properties to your TMyThread 
Object. (This is just data-handling and completely independent of the 
Thread "context" the code is running in.)
> e.g. another routine wants to call the thread's Execute method.
This is forbidden. "Execute" runs in the Thread context and is 
(automatically) called just once per thread Object instance when the 
thread (instance) is started (automatically when created or by 
explicitly by "resume").

-Michael




More information about the Lazarus mailing list