Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=72684 --- shadow/72684 2005-03-10 13:16:55.000000000 -0500 +++ shadow/72684.tmp.10244 2005-06-28 18:34:46.000000000 -0400 @@ -49,6 +49,53 @@ method so it waits for the threads to abort OR exit the domain. ------- Additional Comments From [EMAIL PROTECTED] 2005-03-10 13:16 ------- A thread can't exit the domain where it was created, so if a threadpool thread is created there, it must be aborted. + +------- Additional Comments From [EMAIL PROTECTED] 2005-06-28 18:34 ------- +I think an example of what Zoltan is talking about is: + +using System; +using System.Threading; + +public class X { + + static void Worker (object x) + { + Thread.Sleep (100000); + + } + + + public static void Test () + { + for (int i = 0; i < 10; i ++) + ThreadPool.QueueUserWorkItem (Worker); + } + + static void Main () + { + AppDomain domain = AppDomain.CreateDomain ("otherdomain"); + + domain.DoCallBack (Test); + AppDomain.Unload (domain); + } +} + + +On mono, this test case gives: + [EMAIL PROTECTED] ~]$ mono foo.exe + +** (foo.exe:17291): WARNING **: Aborting of threads in domain +otherdomain timed out. + +Unhandled Exception: System.CannotUnloadAppDomainException: Attempt to +unload application domain failed. +in <0x00000> <unknown method> +in (wrapper managed-to-native) System.AppDomain:InternalUnload (int) +in <0x0001d> System.AppDomain:Unload (System.AppDomain domain) +in <0x0005b> X:Main () + +whereas on msft, it runs fine. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
