문제

For many classes in the .NET frameworks, MSDN describes thead safety as:

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

How is that implemented? is there a syntactic sugar that happens there? or is it implemented inside the class in some way?

Thanks.

도움이 되었습니까?

해결책

That is just an implementation detail of those classes. It just means that the developers for those static methods took care of any thread-safety issues.

It is not a language or framework feature that static methods are thread-safe.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top