I am working on a request timeout mechanism. My initial approach would be to create one System.Threading.Timer for each request. The number of simultaneous requests can increase to a thousand.
I am wondering if I should instead create a TimeoutScheduler that will use only one timer instead of a single request.
Could someone who knows the insides of System.Threading.Timer give me some idea of ββwhether TimeoutScheduler would be a good idea or if it tries to optimize something that is already quite efficient.
Note. For my scenario, timer accuracy is not important.
(I did some performance tests with System.Threading.Timer with a lot of parallel timers. It seemed to scale well, but I'm not sure if it will exert unwanted pressure in a real system)
source
share