Xander
Xander

Reputation: 9171

silverlight web service calls and multithreading

Are silverlight web service calls multithreaded?

I feel like they are.

Others feel like they are not.

Is it really just faking multithreading or it it really multithreaded?

Upvotes: 0

Views: 200

Answers (1)

Ouarzy
Ouarzy

Reputation: 3043

No they are not.

Do not confuse multithreading and asynchronicity. Yes call to web services in Silverlight are asynchronous, no they are not multithreaded.

"WCF proxies in Silverlight applications use the SynchronizationContext of the thread from which the web service call is initiated to schedule the invocation of the async event handler when the response is received. When the web service call is initiated from the UI thread of a Silverlight application, the async event handler code will also execute on the UI thread." http://tomasz.janczuk.org/2009/08/improving-performance-of-concurrent-wcf.html

Still, you can run them on multithread with a few lines of code as explain in this post:Threading multiple async calls

Upvotes: 1

Related Questions