2 using System
.Threading
;
4 public class IntClass
{
7 public IntClass (int val
) { i = val; }
9 public int get () { return i; }
13 [ThreadStaticAttribute
]
16 public static void setField (T t
) { field = t; }
17 public static T
getField () { return field; }
24 public static void otherThread () {
25 Gen
<IntClass
>.setField (new IntClass (2));
26 i2
= Gen
<IntClass
>.getField ().get ();
29 public static int Main () {
30 Gen
<IntClass
>.setField (new IntClass (1));
32 Thread thread
= new Thread (main
.otherThread
);
36 i1
= Gen
<IntClass
>.getField ().get ();
38 if (i1
!= 1 || i2
!= 2)