On 14/06/11 10:53, Michael Schnell wrote:
On 06/10/2011 06:09 PM, Mattias Gaertner wrote:
Sigh. It already does. See my TThreadList.Add example.
This example shows that it does not make sense.
(Supposedly) TThreadList.Add is "separate-instance-thread safe" (each
thread can create an instance and use the "Add" procedure without
risking a conflict).
Everything is "separate-instance-thread safe". How can something be
unsafe if only one thread is accessing it?
TThreadList.Add is not "cross-instance-thread safe" (multiple threads
using the same instance's "Add" procedure will result in erroneous
behavior).
No, it won't. All the operations lock the list, so you can use the same
instance from multiple threads. Just read the source before you make
misguided comments like this.
Henry
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus