[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Threading in a C# application on asp .net 2.0. How do I thread a parameterized method?

Asked by baijajusav in Programming for ASP.NET, C# Programming Language

Tags: c#, asp .net, .net, 2.0, I.E. 6

I have 2 applications. 1 is a java application that will connect to a mainframe and retrieve data from it and write it to a location on a given server. The variables used to do this are passed on the QueryString to the java servlet.

I have a .net application that calls the java application in order to queue up data that needs to be retrieved and written. Currently the task is taking a while as it waits for each UniqueIdentifier to be processed before processing the next one. I am exploring the possibility of using threading to accomplish this, but I'm running into a few snags.

So far, everything I've read on threading says the method you are wrapping in the ThreadStart delegate must return void and have 0 parameters. I don't have an issue w/ the void return, but I need to find a way to pass the function the thread runs 2 string values. The thread also writes to an onscreen control when it finishes. It's just a string of text. Will this operation hold up other threads? Lastly, I need to set a limit of 10 maximum concurrent threads as I don't want to bog down the java servlet application.

Here is what I have so far:

               ThreadStart ts = new ThreadStart( this.RetrieveData );
               Thread t = new Thread( ts  ) ;
               RetrieveData( "DataLocation", Uniqueidentifier );

Obviously I'm getting an error like: 'No overload for RetrieveData' matches delegate 'System.Threading.ThreadStart'.

I had read that the cache was thread safe. Is it possible for me to put a list of uniqueIdentifiers in the cache as well as have each thread write it's output to the cache?

Code examples are highly appreciated at this point. Thank you for your time.

[+][-]11/29/08 08:44 AM, ID: 23060153Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Programming for ASP.NET, C# Programming Language
Tags: c#, asp .net, .net, 2.0, I.E. 6
Sign Up Now!
Solution Provided By: drichards
Participating Experts: 3
Solution Grade: A
 
[+][-]11/28/08 09:49 AM, ID: 23056735Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/29/08 07:06 AM, ID: 23059870Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_2_20070628