S steve Jan 4, 2004 #1 Is StringBuilder thread safe? This thought occurred to me as I was thinking of the reasons they made Strings immutable: thread safety.
Is StringBuilder thread safe? This thought occurred to me as I was thinking of the reasons they made Strings immutable: thread safety.
S Scott M. Jan 4, 2004 #2 If you look in the MSDN help on StringBuilder (or any class for that matter), you will see a link about its thread safety.
If you look in the MSDN help on StringBuilder (or any class for that matter), you will see a link about its thread safety.
S steve Jan 5, 2004 #3 okay, I should have checked the docs more carefully. So essentially you're on your own with StringBuilder. That's what I thought. From the docs for StringBuilder class: http://msdn.microsoft.com/library/d...ml/frlrfsystemtextstringbuilderclasstopic.asp Thread Safety Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. From the docs for String class: http://msdn.microsoft.com/library/d...ef/html/frlrfsystemstringclassequalstopic.asp Thread Safety This type is safe for multithreaded operations.
okay, I should have checked the docs more carefully. So essentially you're on your own with StringBuilder. That's what I thought. From the docs for StringBuilder class: http://msdn.microsoft.com/library/d...ml/frlrfsystemtextstringbuilderclasstopic.asp Thread Safety Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. From the docs for String class: http://msdn.microsoft.com/library/d...ef/html/frlrfsystemstringclassequalstopic.asp Thread Safety This type is safe for multithreaded operations.