Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thread safety: is my thread safe?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00961688
Message ID:
00961800
Views:
4
David,
So does that mean that a non-static member can be made just as thread-safe as a static member?
I guess I need to read some more about threads in .NET, do you know of any good books or articles about threads and thread-safety?

Einar

>No! Just making a member static does not make it thread safe!!!!! What that blurb in the docs means is that Microsoft has added the necessary code to the static members of the class to make them thread safe.
>
>Basically, you can use the lock operator in c# or Monitor.Enter to make your class thread safe.
>
>>Thread Safety
>>Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.
>>
>>I have seen this for several classes in the help documentation, but what does it acctually mean. Why is it so important to use static members in a muti-threaded environment?
>>
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform