I have doubts about using AsParallel () in this scenario. What if I have a large number of visitors to my site, I will not use IIS multiple threads to handle all requests?
This, but, as an AsParallel () option, (potentially) use mutiple threads to cycle through each item in the collection for this request. This will potentially reduce the response time for each request that uses it. It is difficult to say whether this will help you or hinder you, depending on the size of the collection of objects, etc. Verily, you will have to try to see it.
Won't there be lock problems presented after while, or are threads dying because all processors are being used?
Hard to say. It depends on which part of the server is currently in use. If you bind the server 99%, you are likely to have problems (but again, using the AsParallel () option is likely to be the least of your worries.)
source share