2 using System
.Collections
;
3 using System
.Threading
;
6 public static int bridges_done
;
8 public object[] links
= new object [10];
16 int count
= Environment
.ProcessorCount
+ 2;
17 var th
= new Thread
[count
];
18 for (int i
= 0; i
< count
; ++i
) {
19 th
[i
] = new Thread ( _
=>
21 var lst
= new ArrayList ();
22 for (var j
= 0; j
< 5 * 1000 * 1000; j
++) {
23 lst
.Add (new object ());
25 lst
.Add (new Bridge ());
28 if ((j
% 500000) == 0)
29 lst
= new ArrayList ();
37 for (int i
= 0; i
< count
; ++i
)
42 return Bridge
.bridges_done
> 0 ? 0 : 1;