On 2014-06-04 14:42, m...@rpzdesign.com wrote:
For anybody who has followed this thread, there is some disagreement
over the thread safety of shortstrings. And in this case, a shortstring
with a clearly defined maximum length.

Some have clearly said string[30] is NOT thread safe.

Rich indicated below he feels they ARE SAFE.

You have misinterpreted by comment. I was pointing out that short strings are more static than the String type and not the as dynamic as the earlier message indicated. When you assign a new value it is placed in the same memory location as the previous value. This is not always the case with the String type.

Whether static variables are more or less thread safe is for you to decide since you know what you are doing with them. I don't think either short strings or Strings are inherently more or less thread safe. It depends on what you do with them.

--

Cheers!
Rich Saunders
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to