Monday, October 1, 2012

,NET timers

Comparisons: http://msdn.microsoft.com/en-us/magazine/cc164015.aspx

Note that System.Timers.Timer and System.Threading.Timer by default call your timer event handler on a worker thread obtained from the common language runtime (CLR) thread pool.



 System.Windows.FormsSystem.TimersSystem.Threading
Timer event runs on what thread?UI threadUI or worker threadWorker thread
Instances are thread safe?NoYesNo
Familiar/intuitive object model?YesYesNo
Requires Windows Forms?YesNoNo
Metronome-quality beat?NoYes*Yes*
Timer event supports state object?NoNoYes
Initial timer event can be scheduled?NoNoYes
Class supports inheritance?YesYesNo
* Depending on the availability of system resources (for example, worker threads)

No comments:

Post a Comment