On Tue, 14 Jun 2011 11:53:14 +0200
Michael Schnell <[email protected]> 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).
> 
> TThreadList.Add is not "cross-instance-thread safe" (multiple threads using 
> the same instance's "Add" procedure will result in erroneous behavior).

Why do you think so?

 
> Simply stating that TThreadList.Add is "not thread save" (which of course is 
> perfectly correct) would prevent using a TThreadList as a data store e.g. in 
> a thread class that itself is instantiated multiple times. There using 
> TThreadList would be overkill.


Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to