On Thu, 2 Oct 2014, 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? 

TFPList is not thread-safe. You need to use TThreadList if you want a 
thread-safe list.

Critical sections use OS calls, so there is always a performance penalty.

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

Reply via email to