2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / main-returns-background-change.cs
blob23f4b285aec02a055be31cf6b54a607322b94885
2 using System;
3 using System.Threading;
5 public class foo {
6 public static void Main() {
7 Thread thr=new Thread(new ThreadStart(foo.thread));
8 thr.Start();
9 Console.WriteLine("Main thread returns");
12 public static void thread() {
13 Console.WriteLine("Thread running");
14 Thread.Sleep(500);
15 Console.WriteLine("Thread running");
16 Thread.Sleep(500);
17 Thread.CurrentThread.IsBackground = true;
18 Console.WriteLine("Thread running");
19 Thread.Sleep(500);
20 Console.WriteLine("Thread running");
21 Thread.Sleep(500);
22 Console.WriteLine("Thread running");
23 Environment.Exit (1);