Multithreaded design

  • Thread starter Thread starter csharpula csharp
  • Start date Start date
C

csharpula csharp

Hello,
I would like to create 3 or 4 parallel actions which will connect to
different web services at once and activate some actions that create
results that my main thread need to get back.
Which is the best way to design it?
Thank you!
 
The web service proxies that are generated by adding a web reference to
create asynchronous methods to connect to the web service I believe (they
should have signatures that end with Async).

You can then make the 3 or 4 calls that you need, and then wait on all
of them to complete in your thread, or you can set flags and perform work on
the last callback when all the methods have completed.

If you are setting a service reference, then you can click on the
"advanced" tab and select the option to generate async methods. These
methods will begin with "Begin" and use the old async pattern (that returns
IAsyncResult).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top