On 16.03.2017 19:38, African Wild Dog wrote:
I have a class where its instances are shared between multiple threads.
How can I declare one variable per instance per thread?
Does this really make sense ?

Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves an OS call) than accessing normal variables.

Supposedly the way to go is to do per-thread instances of a class, that might reference the other classes you want to instantiate.

-Michael

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to