Reputation: 3173
There is web-handler(high-load) at my asp.net application which should call several(2,3) requests to independant web-services get some results from it, combine it and send complex result to user.
For parallel consuming web-services I'm going to use ThreadPool. Is it a good idea?
Oh may be I should create threads manually?
Thanks for answer.
Upvotes: 0
Views: 80
Reputation: 3523
As sJhonny said you really don't want to be dealing with Threads in ASP.Net. There are many hooks into getting this working correctly though.
In this the Asynchronous page model will handle 99% of what you will ever need.
Upvotes: 2
Reputation: 6742
actually when several requests arrive simultanuosly, the asp.net engine knows to create a different thread for each of them without any involvment from your side.
so, unless there's some special need for you to create threads yourself- I would advise against it.
actually, if an uncaught exception is raised in a thread, it might cause the entire worker process to shut down, thus bringing down your whole application.
Upvotes: 1