[tests] Test loading references from LoadFrom and LoadFile contexts
[mono-project.git] / mono / tests / classinit3.cs
blob865b621c29a6ec87766f885948042f0c484d415a
1 using System;
2 using System.Collections.Generic;
3 using System.Threading;
4 namespace integer_test
6 class MainClass
8 // #23242
9 public static void Main (string[] args)
11 var _trigger = new ManualResetEvent (false);
13 var testThreads = new Thread[100];
14 for (Int16 i = 0; i < testThreads.Length; ++i)
16 testThreads [i] = new Thread ( () =>
18 _trigger.WaitOne();
19 for (Int16 index = 0; index < 1000; ++index)
21 var val = index.ToString();
22 GC.KeepAlive(val);
24 });
25 testThreads [i].Start ();
27 Console.WriteLine ("setting event");
28 _trigger.Set ();
29 foreach (var thread in testThreads)
31 thread.Join ();