开发者

Time thread just stops after a while

I have a timer in C# (System.Threading.Timer) which runs great and after a while it's thread just disappears...

No exceptions have been caught and the reference to the timer is not lost (it's therefore not collected by the GC)

Is there anything that else else which could cause th开发者_如何学运维is?

(I can't post the code here)

Thanks for the help :)


Even if your code inside callback is perfectly valid someone may incorrectly works with ThreadPool threads in your project and System.Threading.Timer uses ThreadPool threads to handle their callback, therefore, you simply may run out of free threads to handle timer callbacks.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜