开发者

Timer tick event in separate thread

Is it anyone how to create a thread for timer tick event. In开发者_开发百科 Windows desktop application timer tick event should be controlled by a separate thread. Is it possible?


Use System.Threading.Timer and the timer event will fire on a worker thread.

The timer delegate is specified when the timer is constructed, and cannot be changed. The method does not execute on the thread that created the timer; it executes on a ThreadPool thread supplied by the system.

I am assuming that what you mean by "should be controlled by a separate thread" is that the event handler runs on a thread other than the UI thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜