Multithreaded Use |
![]() |
|
|
|
|
|
This method will set the multithreaded flag on this particular object to TRUE. After calling SetMT, it is safe to use the string object from multiple threads. If the flag is not set, passing the string to another thread will throw a program error exception whenever the other thread attempts to modify the string.
Calling SetMT multiple times is harmless. However, it should always be called on the thread which created the string object's buffer.
Once a particular string object has been marked as MT-enabled, there is no way to switch back to single threaded model.
On platforms that do not support multithreading, or when multithreading support is not enabled, this method still exists but does nothing and carries no overhead.
See Multithreading Overview for a general discussion.
|
|
|
|
|
Returns TRUE if the string object was marked for multithreaded use.
On platforms that do not support multithreading, this method exists but will always return FALSE.
See also: Basic operations, Multithreading Overview