[Mono-bugs] [Bug 43963][Blo] New - ThreadPool.RegisterWaitForSingleObject does not work

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 30 May 2003 21:15:42 -0400 (EDT)


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 gonzalo@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=43963

--- shadow/43963	Fri May 30 21:15:42 2003
+++ shadow/43963.tmp.26088	Fri May 30 21:15:42 2003
@@ -0,0 +1,53 @@
+Bug#: 43963
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ThreadPool.RegisterWaitForSingleObject does not work
+
+Compile and run:
+----
+using System;
+using System.Threading;
+
+class C
+{
+	static ManualResetEvent exit = new ManualResetEvent (false);
+	static void cb (object o, bool timedOut)
+	{
+		Console.WriteLine ("cb called");
+		exit.Set ();
+	}
+	
+	static void Main ()
+	{
+		ManualResetEvent e = new ManualResetEvent (true);
+
+		ThreadPool.RegisterWaitForSingleObject (e,
+					new WaitOrTimerCallback (cb),
+					null,
+					-1,
+					true);
+
+		exit.WaitOne ();
+	}
+}
+----
+
+Actual results:
+the program never ends and no output.
+
+Expected results:
+cb called
+...and then exit.