On 10/02/2014 03:02 AM, Xiangrong Fang wrote:
Hi,

I would like to know if TFPList is thread-safe or not? And if I make a component thread-safe by using critical sections etc. Is the performance penalty noticeable?
For a class, Thread save" is not that easily defined.

e.g.:

It can be fully thread save (like TThreadList): you can call any function/property at any time from any thread. It could be allowed to create multiple instances in multiple threads and use each of them with it's own thread but not with others (holds for TList) It could be allowed to crate an instance with one thread and after that use functions/properties with a single other one. (e.g.: TList) it could be allowed to use all instances of the class only in a one and only thread. It could be allowed to be used only in a predefined (e.g. the main-) thread (many classes in the LCL).
...

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

Reply via email to