D
dee
OleDbCommand class like many .NET classes has the following description in
its help file:
"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 2 questions:
1. I thought dynamic variables are thread-safe since threads have their own
stack and static data had to be synchronized. However, many many .NET
classes say ONLY static members of thier type are thread safe. Why is that?
2. Do we still have to synchronize access to this shared data?
3. If only static members are thread-safe why all the examples use non
static data?
Thanks.
Dee
its help file:
"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 2 questions:
1. I thought dynamic variables are thread-safe since threads have their own
stack and static data had to be synchronized. However, many many .NET
classes say ONLY static members of thier type are thread safe. Why is that?
2. Do we still have to synchronize access to this shared data?
3. If only static members are thread-safe why all the examples use non
static data?
Thanks.
Dee