[Lazarus] thread safe

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 27 16:15:53 CEST 2011


 
 


 Michael Schnell <mschnell at lumino.de> hat am 27. Juni 2011 um 15:54 geschrieben:


>  On 06/27/2011 03:34 PM, Mattias Gaertner wrote:
> >  
> >  The documentation can simply say about TList:
> >  Thread safe: no
> >  Used non thread safe global variables: none
> > 
Poor user !!!!!
>  If he just reads Thread safe: no, he supposedly will believe he needs to use
> TThreadList in all threads and do very inefficient code.
>  How is he supposed to know that accessing a TList instance with just a single
> thread while accessing another instance only with another thread is safe ?
 
And how is he supposed to know that this only one way of using a TList with
multiple threads and that are plenty of other ways?
Answer: By first reading a tutorial/book about multi threading, including
critical sections etc that explains how to use thread unsafe code with multiple
threads. 
Of course it would be nice if the section about thread safety has a link to such
a multi threading tutorial. 
And of course you are free to provide examples for the documentation. I know,
you have no time for that. 
 
 


> 
>  A new term (decently explained on a central location) that can be used in a
> Feature grid would be much more readable.

 A new term would need explanation too.

 Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110627/b85cbb14/attachment-0003.html>


More information about the Lazarus mailing list