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?
精彩评论