[Mono-bugs] [Bug 605092] New: System.Timers.Timer.TimerComparer fails to compare arguments
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed May 12 05:18:17 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=605092
http://bugzilla.novell.com/show_bug.cgi?id=605092#c0
Summary: System.Timers.Timer.TimerComparer fails to compare
arguments
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: aenomoto at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
This is a forwarded report from https://gist.github.com/21ab0a6c1015f96f9c19
Our System.Timers.Timer.TimerComparer (which is used by the scheduler) does not
look at instance differences and hence it may fail to compare instances.
Copying the repro from the link above:
using System;
using System.IO;
using System.Threading;
using System.Collections.Generic;
public class Test {
private static Timer t1;
private static Timer t2;
private static Timer t3;
public static void Main () {
t1 = new Timer(Callback1, null, 0, 1000);
t2 = new Timer(Callback2, null, 0, 1000);
t3 = new Timer(Callback3, null, 0, 1000);
Console.ReadLine();
}
private static void Callback1(Object o) { Console.Write('1'); }
private static void Callback2(Object o) { Console.Write('2'); }
private static void Callback3(Object o) { Console.Write('3'); }
}
ran on .net:
$ ./x.exe
213132132123132132132123132132132132
ran on mono:
$ mono ./x.exe
3333333333333333333333
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list