开发者

Timer event does not fire until WaitOne times out

I have a timer that fires periodically to check for new data. Occasionally, I need the timer to fire immediately and I need to wait for timer handler to do its thing before continuing. I tried having the handler set an AutoResetEvent that my main thread would then wait开发者_运维问答 on but this did not work. The timer would not fire until after my call to WaitOne timed out. I have tried using System.Timers.Timer and System.Threading.Timer with the same results. Any ideas as to what I am doing wrong?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜