.Net Timer foman

1 System.Timers.Timer   

      The Elapsed event is raised on a ThreadPool thread. If the processing of the Elapsed event lasts longer than Interval, the event might be raised again on another ThreadPool thread. Thus, the event handler should be reentrant.

2 System.Thread.Timer      

      The method specified for callback should be reentrant, because it is called on ThreadPool threads. The method can be executed simultaneously on two thread pool threads if the timer interval is less than the time required to execute the method, or if all thread pool threads are in use and the method is queued multiple times.

3 System.windows.Timer

      It is based on UI Thread.When process elapsed event,UI(winform) will lose response.

原文地址:https://www.cnblogs.com/foman/p/1457835.html