https://bugzilla.novell.com/show_bug.cgi?id=437888
Summary: Wrong behavior when changing the background state of a
threadpool thread
Product: Mono: Runtime
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
Compile and run the following program:
----------------------------
using System;
using System.Threading;
class Test {
static void Main ()
{
ThreadPool.QueueUserWorkItem (Proc);
Thread.Sleep (1000);
Console.WriteLine ("Wake up Main");
}
static void Proc (object unused)
{
Console.WriteLine (Thread.CurrentThread.IsBackground);
Thread.CurrentThread.IsBackground = false;
Console.WriteLine (Thread.CurrentThread.IsBackground);
Thread.Sleep (10000);
Console.WriteLine ("Wake up TP");
}
}
------------------------------
Expected results:
Wake up Main [after 1 second]
Wake up TP [after 10 seconds]
[exit immediately]
Actual results:
Wake up Main [after 1 second]
Wake up TP [after 10 seconds]
[takes a while to exit]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs