using System.Threading;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
+using MonoTests.Helpers;
public class Toggleref {
public int __test;
static int test_0_root_keeps_child ()
{
Console.WriteLine ("test_0_root_keeps_child");
- var t = new Thread (SetupLinks);
- t.Start ();
- t.Join ();
+ FinalizerHelpers.PerformNoPinAction (SetupLinks);
GC.Collect ();
GC.WaitForPendingFinalizers ();
{
Console.WriteLine ("test_0_child_goes_away");
- var t = new Thread (SetupLinks2);
- t.Start ();
- t.Join ();
+ FinalizerHelpers.PerformNoPinAction (SetupLinks2);
GC.Collect ();
GC.WaitForPendingFinalizers ();
{
Console.WriteLine ("test_0_CWT_keep_child_alive");
- var t = new Thread (SetupLinks3);
- t.Start ();
- t.Join ();
+ FinalizerHelpers.PerformNoPinAction (SetupLinks3);
GC.Collect ();
GC.WaitForPendingFinalizers ();
return TestDriver.RunTests (typeof (Driver), args);
}
-}
\ No newline at end of file
+}