[Mono-bugs] [Bug 57993][Nor] New - System.Timers.Timer AutoReset allows event to fire twice
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 3 May 2004 13:48:00 -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 timf@dicecorp.com.
http://bugzilla.ximian.com/show_bug.cgi?id=57993
--- shadow/57993 2004-05-03 13:48:00.000000000 -0400
+++ shadow/57993.tmp.3698 2004-05-03 13:48:00.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 57993
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: timf@dicecorp.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Timers.Timer AutoReset allows event to fire twice
+
+Description of Problem:
+The AutoReset property of System.Timers.Timer, according to the
+documentation, is supposed to allow the Timer to fire the Elapsed event
+once, and automatically Stop() the Timer when it is set to false. Under
+the current implementation in Mono, the event fires twice.
+
+Steps to reproduce the problem:
+1. Create a System.Timers.Timer object, set an Interval, set AutoReset to
+false, and attach an event handler to the Elapsed property.
+2. Call Start() on the Timer.
+3. Watch as the event handler is fired twice instead of once.
+
+Actual Output:
+Press ENTER to exit.
+SHOULD ONLY PRINT ONCE
+SHOULD ONLY PRINT ONCE
+
+Expected Results (from MS .NET Framework 1.1.4322):
+Press ENTER to exit.
+SHOULD ONLY PRINT ONCE
+
+How often does this happen?
+This problem only occurs when the AutoReset property is set to false. If
+AutoReset is false, this incorrect behavior happens every time the class
+is used.
+
+Additional Information:
+See the test case for an example of the problem and a proposed patch -- to
+be attached as soon as the bug is submitted.