}
public static int Main() {
-
// Check aborting the current thread
bool aborted = false;
try {
if (!aborted)
return 2;
- Thread t1 = new Thread(new ThreadStart
- (MultiThreadExceptionTest.ThreadStart1));
- t1.Name = "Thread 1";
+ Thread t1 = null;
- Thread.Sleep (100);
+ lock (started) {
+ t1 = new Thread(new ThreadStart
+ (MultiThreadExceptionTest.ThreadStart1));
+ t1.Name = "Thread 1";
+
+ Thread.Sleep (100);
- t1.Start();
+ t1.Start();
- lock (started) {
Monitor.Wait (started);
}
Thread.Sleep (100);
-
+
t1.Abort ("STATETEST");
t1.Join ();
- Console.WriteLine ("Result: " + result);
- if (result != 59)
+ if (result != 59) {
+ Console.WriteLine ("Result: " + result);
return 1;
+ }
// Test from #68552
try {