[Mono-bugs] [Bug 69493][Nor] Changed - System.Threading.Timer invokes callback immediately when dueTime parameter is equal to Int32.MaxValue

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Nov 2004 18:50:58 -0500 (EST)


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=69493

--- shadow/69493	2004-11-17 12:22:11.000000000 -0500
+++ shadow/69493.tmp.6492	2004-11-24 18:50:58.000000000 -0500
@@ -1,16 +1,16 @@
 Bug#: 69493
-Product: Mono: Class Libraries
-Version: 1.1
+Product: Mono: Runtime
+Version: unspecified
 OS: Red Hat 9.0
 OS Details: 
 Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Normal
-Component: CORLIB
+Component: misc
 AssignedTo: gonzalo@ximian.com                            
 ReportedBy: akuznets@mera.ru               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
@@ -55,6 +55,27 @@
 
 	static void OnTime(object state)
 	{
 		Console.WriteLine("OnTime");
 	}
 }
+
+------- Additional Comments From gonzalo@ximian.com  2004-11-24 18:50 -------
+Looks like a runtime bug. I added a Console.WriteLine in 'bool WaitOne
+(int millisecondsTimeout, bool exitContext)' right before calling
+WaitOne_internal and the output of the millisecondsTimeout argument is:
+
+ms Timeout: 2147483646
+
+But gdb says:
+
+(gdb) c
+Continuing.
+ms Timeout: 2147483646
+
+Breakpoint 1, ves_icall_System_Threading_WaitHandle_WaitOne_internal (
+    this=0x81e9f60, handle=0x1, ms=1, exitContext=0) at threads.c:828
+828             ret=WaitForSingleObjectEx (handle, ms, TRUE);
+
+if i trust those parameters, the number of ms is 1.
+And in any case, the WaitOne on Int32.MaxValue is returning
+immediately with a 'false' value.