S
stub
Several objects of the same class, which contains a static member function,
are created in several threads.
If the said member function is called in the threads concurrently, it must
be made to be thread-safe. For a non-static member function, this should
not be a concern. Is this a correct understanding?
Similarly, for a static member variable, if more than one thread read/write
it, should the accesses of threads be synchronized?
are created in several threads.
If the said member function is called in the threads concurrently, it must
be made to be thread-safe. For a non-static member function, this should
not be a concern. Is this a correct understanding?
Similarly, for a static member variable, if more than one thread read/write
it, should the accesses of threads be synchronized?