Hi Carl,
Thread-Save means "to be safe if simultaneous access from different Threads may 
(!!) occur".
If you can make it dammn sure simultaneous access can NOT happen, you're on the 
right side of the fence.
A stringlist which is created (and freed) in a Procedure of a Thread is always 
safe, but any object which
resides in an area which is public to a thread is a candidate for mishap, so 
beware of that.
Have fun
Bob
 
>     How does one tell if something is thread safe? At the moment I'd like to 
> use TStringList in a multi-threaded application.
>     
>     As I understand it, TStringList is NOT thread safe, BUT . . .
>     
>     . . . what if each thread has it's own TStringlist for doing various data 
> manipulations on - is it safe to use? There is no cross-talk between the 
> threads or main application, but there 
>     could be many threads, each simultaneously doing many operations on it's 
> own TStringList.
>     
>     It appears to operate OK, but for me experience has been a cruel teacher 
> when it comes to multi-threaded. Am I lucky? or Is it OK as long as you only 
> operate on your own thread's 
>     data?
>     
>     Regards,
>     
>     Carl.
>     



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to