When you annotate a field with the ThreadStatic
attribute, it is an indication that the value of this field is unique for each thread. But if you don’t mark the field as static
,
then the ThreadStatic
attribute is ignored.
The ThreadStatic
attribute should either be removed or replaced with the use of ThreadLocal<T>
class, which gives a similar
behavior for non-static fields.