Hello All,
I am pretty new to multithreading but recently came across a problem which I feel needed to use multple threads.
I am creating a dashboard app in asp.net c# which has a number of different sections (panels). Each section loads data for different departments such as finance, sales, markting etc. Each of the sections has a different database query attached to it and some obviously take longer than others. In some cases the queries can take 15-20 seconds to return results.
I need to show a progress indicator for each section which is replaced when the data has loaded for the section and then a pretty graph is displayed in place of the progress animation.
The graphs displaying the data create an xml file on the fly from the database and store this on the server. Because I need multiple threads to look after each section I need each thread to access the same method which create my xml file however the file can not be created by the threads. I believe this is because different processes cannot access the files at the same time? How do I get arounf this? Is there a way to make the thread act as the worker process or do I need to queue the threads somehow?
Any help would be appreciated. Thanks
I am pretty new to multithreading but recently came across a problem which I feel needed to use multple threads.
I am creating a dashboard app in asp.net c# which has a number of different sections (panels). Each section loads data for different departments such as finance, sales, markting etc. Each of the sections has a different database query attached to it and some obviously take longer than others. In some cases the queries can take 15-20 seconds to return results.
I need to show a progress indicator for each section which is replaced when the data has loaded for the section and then a pretty graph is displayed in place of the progress animation.
The graphs displaying the data create an xml file on the fly from the database and store this on the server. Because I need multiple threads to look after each section I need each thread to access the same method which create my xml file however the file can not be created by the threads. I believe this is because different processes cannot access the files at the same time? How do I get arounf this? Is there a way to make the thread act as the worker process or do I need to queue the threads somehow?
Any help would be appreciated. Thanks