2 /* test for https://bugzilla.xamarin.com/show_bug.cgi?id=41914 */
5 using System
.Threading
;
11 public static void Main (string[] args
)
13 Thread
[] threads
= new Thread
[100];
15 DateTime start
= DateTime
.Now
;
17 for (int i
= 0; i
< threads
.Length
; ++i
) {
18 threads
[i
] = new Thread (() => {
19 var rnd
= new Random();
21 using (var mutex
= new Mutex(false, "Global\\TEST")) {
24 owner
= mutex
.WaitOne(TimeSpan
.FromMinutes(1));
30 Thread
.Sleep(rnd
.Next(100, 1000));
31 } while ((DateTime
.Now
- start
) < TimeSpan
.FromSeconds (10));
35 for (int i
= 0; i
< threads
.Length
; ++i
)
38 for (int i
= 0; i
< threads
.Length
; ++i
)
42 private static void Crasher(){