Is GetTextOrDefault thread safe?

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
pls
Posts: 13
Joined: Mon Feb 09, 2004 8:36 pm
Location: Phoenix, AZ, USA

Is GetTextOrDefault thread safe?

Post by pls »

Can it be called from more than one thread?

I have a source component without a form that runs in its own thread. How can I handle strings in this component?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Yes it is thread safe since it will only read from translations list. So you can use it in threads as well.
pls
Posts: 13
Joined: Mon Feb 09, 2004 8:36 pm
Location: Phoenix, AZ, USA

Post by pls »

Well, not exactly. tsiLang supports switching languages on the fly. I haven't checked, but I'm guessing that it changes the string lists.

Granted it's not a frequent operation, but experience with multi-threaded apps teaches me that the one you think is least likely is the one that get you.

++PLS
Post Reply