ASP.Net, Multithreading, and Response object
-
I have a web app that runs a bunch of SSRS reports in the background, i settled on running each reports (up to 30 ata time ) on different threads, and it runs lightning fast, generating all of them almost simultaneously. Then i was asked to display the results (namely success or failure, and if failure, what caused it) to the page. my question is, is it possible, and if so how do I write the results from the threads to a page while they run. I have run loops in the past and used Response.Flush() after Response.Write() to display the results, but things start to get hairy when using multiple threads. Any ideas?
______________________ Mr Griffin, eleventy billion is not a number...:wtf:
-
I have a web app that runs a bunch of SSRS reports in the background, i settled on running each reports (up to 30 ata time ) on different threads, and it runs lightning fast, generating all of them almost simultaneously. Then i was asked to display the results (namely success or failure, and if failure, what caused it) to the page. my question is, is it possible, and if so how do I write the results from the threads to a page while they run. I have run loops in the past and used Response.Flush() after Response.Write() to display the results, but things start to get hairy when using multiple threads. Any ideas?
______________________ Mr Griffin, eleventy billion is not a number...:wtf:
Well I think the first thing to do is to synchronize the output. I assume you some class that is controlling all the threads. This class should compile the results. Then your page can get the information through a web service you call client side. You can use the output to update your we b page. Or perhaps another option would be to implement the ICallbackEventHandler interface and have some client side code on a timer.
modified on Friday, March 28, 2008 12:07 PM