Which features make a class to be thread-safe?

后端 未结 6 1372
太阳男子
太阳男子 2020-12-13 03:19

In MSDN some .NET classes described like this:

\"This type is thread safe.\"

or

\"Public static (Shared in Visual Basic) m

6条回答
  •  庸人自扰
    2020-12-13 03:28

    A Class is considered thread safe if only one thread at a time can modify the state of the objects created from the class OR the class provide such functionality that multiple threads can call various methods of the class at same time.

提交回复
热议问题