Hi guys, firstly I got some Timers setup to run against the Thread pool using the TimerCallback right? Basically what I want is I want the Timer to run every x amount of seconds but only run if an event happens, I did look at manual reset event and stuff but im not sure how it works.
So say there are 1 items in a dictionary, the timer runs at x amount of seconds against thread pool, but if the dictionary is empty, the timer just sits there and doesn't queue any work load but continues again once the dictionary is populated, help appreciated :D
Question
SuperKid
Hi guys, firstly I got some Timers setup to run against the Thread pool using the TimerCallback right? Basically what I want is I want the Timer to run every x amount of seconds but only run if an event happens, I did look at manual reset event and stuff but im not sure how it works.
So say there are 1 items in a dictionary, the timer runs at x amount of seconds against thread pool, but if the dictionary is empty, the timer just sits there and doesn't queue any work load but continues again once the dictionary is populated, help appreciated :D
matt.
Link to comment
https://www.neowin.net/forum/topic/1018984-c-timers-with-thread-pool/Share on other sites
4 answers to this question
Recommended Posts