From: Marek Safar Date: Fri, 12 Jul 2013 15:44:53 +0000 (+0200) Subject: Don't eat exception from timer handler (this is system timer not SWF timer) X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=238785a3e3d510528228fc551625975bc508c2f3;p=mono.git Don't eat exception from timer handler (this is system timer not SWF timer) --- diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs index 22786f65881..63358776056 100644 --- a/mcs/class/corlib/System.Threading/Timer.cs +++ b/mcs/class/corlib/System.Threading/Timer.cs @@ -311,13 +311,10 @@ namespace System.Threading return idx; } - static WaitCallback TimerCaller = new WaitCallback (TimerCB); static void TimerCB (object o) { Timer timer = (Timer) o; - try { - timer.callback (timer.state); - } catch {} + timer.callback (timer.state); } void SchedulerThread () @@ -340,7 +337,7 @@ namespace System.Threading list.RemoveAt (i); count--; i--; - ThreadPool.UnsafeQueueUserWorkItem (TimerCaller, timer); + ThreadPool.UnsafeQueueUserWorkItem (TimerCB, timer); long period = timer.period_ms; long due_time = timer.due_time_ms; bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite));