Reduce TLS accesses. (#11487)
[mono-project.git] / mono / tests / main-exit.cs
blob72ffeddb064780c996161bd0ffdf9feb2eb01100
2 using System;
3 using System.Threading;
5 public class foo {
6 public static int Main() {
7 Environment.ExitCode = 2;
8 Thread thr=new Thread(new ThreadStart(foo.thread));
9 thr.Start();
10 Thread.Sleep(1200);
11 Console.WriteLine("Main thread exiting");
12 Environment.Exit(0);
13 return 1;
16 public static void thread() {
17 Console.WriteLine("Thread running");
18 Thread.Sleep(500);
19 Console.WriteLine("Thread running");
20 Thread.Sleep(500);
21 Console.WriteLine("Thread running");
22 Thread.Sleep(500);
23 Console.WriteLine("Thread running");
24 Thread.Sleep(500);
25 Console.WriteLine("Thread running");