[Lazarus] thread safe
Michael Schnell
mschnell at lumino.de
Tue Jun 14 17:32:01 CEST 2011
On 06/14/2011 04:57 PM, Hans-Peter Diettrich wrote:
>
> How would you expect a thread-safe version to work? A TList doesn't
> serialize requests, this would have to be added separately.
>
It does not need to, as "separate-instance-thread safe" means that each
thread handles only it's own instance.
"Add" only needs to use stack variables and instance variables. Both are
dedicated to the thread and thus don't need a protection (OK it if needs
to allocate memory the heap allocation procedure does need protection
mechanism, but this is provided by the infrastructure anyway. )
-Michael
More information about the Lazarus
mailing list