https://bugzilla.novell.com/show_bug.cgi?id=379524
Summary: Environment.Exit in separate thread results in thread
creation failure
Product: Mono: Runtime
Version: SVN
Platform: All
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Invoking Environment.Exit in a separate thread results in a thread creation
failure.
To reproduce, compile and run the following code snippet:
using System;
using System.Globalization;
using System.Threading;
class Program
{
static int Main (string [] args)
{
for (int i = 0; i < 1000; ++i) {
Thread thread = new Thread (new ThreadStart (Test));
if (i != 500)
thread.CurrentCulture = new CultureInfo ("en-CA");
thread.Start ();
}
return 1;
}
static void Test ()
{
string name = Thread.CurrentThread.CurrentCulture.Name;
if (name != "en-CA")
Environment.Exit (0);
}
}
Expected result:
Successful execution (exit code 0)
Actual result:
(test.exe:4740): WARNING **: ves_icall_System_Threading_Thread_Thread_internal:
CreateThread error 0x8
Unhandled Exception: System.SystemException: Thread creation failed.
at System.Threading.Thread.Start () [0x00000]
at Program.Main (System.String[] args) [0x00000]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs