Reputation: 552
I'm building a rather simple application that performs a few seperate HTTPWebRequests, each on their own timer. It's not likely I will need to have more than 3 seperate requests running at a time.
If a Timer Tick fires while another HTTPWebRequest is in progress, what happens to the event fired by the Timer Tick? Should I add Threading?
Upvotes: 10
Views: 596
Reputation: 100527
The answer is almost always - no, don't use threads just because you can.
Consider making asynchronous calls first as it is easier to write correct code for. It is likely more efficient use of resources (as threads are not unlimited resource) if you need additional arguments.
Links:
Upvotes: 6
Reputation: 12226
When Timer.Tick
fires it's handler will be scheduled for execution in Thread Pool and most likely, executed in another thread.
Upvotes: 1