Merge pull request #5382 from kumpera/pedump_fix
[mono.git] / mono / tests / appdomain-unload.cs
index d4673c79584328524e8f56222d4ed9d2f51597ab..e5ce63689219231bba99f26ef95eb35baafc8c1f 100644 (file)
@@ -16,6 +16,13 @@ public class Bar : MarshalByRefObject {
                Console.WriteLine ("in " + Thread.GetDomain ().FriendlyName);
                return x + 1;
        }
+
+       public void start_wait () {
+               Action a = delegate () {
+                       Thread.Sleep (10000);
+               };
+               a.BeginInvoke (null, null);
+       }
 }
 
 [Serializable]
@@ -265,6 +272,16 @@ public class Tests
                }
        }
 
+       public static int test_0_abort_wait () {
+               AppDomain domain = AppDomain.CreateDomain ("AbortWait");
+               Bar bar = (Bar)domain.CreateInstanceAndUnwrap (typeof (Tests).Assembly.FullName, "Bar");
+               int x;
+
+               bar.start_wait ();
+               AppDomain.Unload (domain);
+               return 0;
+       }
+
        // FIXME: This does not work yet, because the thread is finalized too
        // early
        /*