[Mono-bugs] [Bug 69493][Nor] New - System.Threading.Timer invokes callback immediately when dueTime parameter is equal to Int32.MaxValue
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 15 Nov 2004 02:41:33 -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 akuznets@mera.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=69493
--- shadow/69493 2004-11-15 02:41:33.000000000 -0500
+++ shadow/69493.tmp.7996 2004-11-15 02:41:33.000000000 -0500
@@ -0,0 +1,60 @@
+Bug#: 69493
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: akuznets@mera.ru
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Threading.Timer invokes callback immediately when dueTime parameter is equal to Int32.MaxValue
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem: System.Threading.Timer invokes callback
+immediately when dueTime parameter is equal to Int32.MaxValue
+
+Steps to reproduce the problem:
+Compile included code with the following cmd line
+csc /out:Test.exe /target:exe TextFile1.cs
+
+Actual Results:
+Callback function is invoked immediately displaing "OnTime" string in
+console output
+
+Expected Results:
+No time string displayed because callback must be invoked after a long
+period of time
+
+
+How often does this happen?
+aways
+
+Additional Information:
+using System;
+using System.Threading;
+
+class A
+{
+ static void Main()
+ {
+ // create timer
+ Timer timer = new Timer(new TimerCallback(OnTime), null,
+Int32.MaxValue, Timeout.Infinite);
+
+ // wait
+ Console.ReadLine();
+ }
+
+ static void OnTime(object state)
+ {
+ Console.WriteLine("OnTime");
+ }
+}