Matthew Cox

Matthew Cox

  • NA
  • 17
  • 0

MultiThreading Calls to a Web Service for consumption

May 24 2010 7:18 PM

I am designing a windows service that consumes a web service. I have Timer instances running that trigger callback events once timers elapse, then a particular method within the web service is consumed. Since the timers are different and have different threads, it is possible right now for multiple threads to attempt consuming the web service simultaneously, which cannot occur.
 
I know there are some know idioms and methods for attacking this process. I essentially want to queue up requests to consume the service, then let it occur as the web service becomes available each time till the queue is empty. But I'm not sure of the devices nor am I familiar with multithreading in C#
 
Any help would be great!

Answers (2)