[fpc-pascal] Is TFPList thread safe?
Xiangrong Fang
xrfang at gmail.com
Thu Oct 2 15:59:34 CEST 2014
2014-10-02 14:16 GMT+08:00 Michael Van Canneyt <michael at freepascal.org>:
>
> 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.
I think the only thread-critical operation I need is to add item to the
list, so I will use critical section myself, not replace TFPList with
TThreadList, for simplicity and performance reason...
Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20141002/be9343bc/attachment.html>
More information about the fpc-pascal
mailing list