Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / tests / exit-stress.cs
1 //
2 // https://bugzilla.novell.com/show_bug.cgi?id=379524
3 //
4
5 using System;
6 using System.Globalization;
7 using System.Threading;
8
9 class Program
10 {
11   static int Main (string [] args)
12   {
13     for (int i = 0; i < 1000; ++i) {
14       Thread thread = new Thread (new ThreadStart (Test));
15       if (i != 500)
16         thread.CurrentCulture = new CultureInfo ("en-CA");
17       thread.Start ();
18     }
19     return 1;
20   }
21
22   static void Test ()
23   {
24     string name = Thread.CurrentThread.CurrentCulture.Name;
25     if (name != "en-CA")
26       Environment.Exit (0);
27   }
28 }