Solved

Thread Limit

Posted on 2013-07-01
4
556 Views
Last Modified: 2013-07-01
Is there a "Thread Limit?" in VB.Net?
0
Comment
Question by:lrbrister
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:lenordiste
ID: 39291136
there's not really a limit defined for threads in .NET (VB.NET being a language such notion does not exist). The only limit I can think of is a physical one which is the hardware your code is running on. Why are you asking this question ? it seems that you have an underlying problem at hand :)
0
 

Author Comment

by:lrbrister
ID: 39291151
No...I have no underlying problem at all.

I have a process that does a series of HttpWebRequests each in their own thread
12 of them.

Because of the way I'm posting the request, I was asked if I could "do it all" in a separate data post
Since I'm keeping each Web Request  response stream open with
While streamResponse.CanRead...

This means that I would have (x) threads...up to 100 all with an open Response Stream
instead of my current 12
0
 
LVL 11

Accepted Solution

by:
lenordiste earned 500 total points
ID: 39291195
you may want to use a threadpool to manage your threads as it provides useful functionalities:
http://msdn.microsoft.com/en-us/library/system.threading.threadpool.aspx

On a side note, you may easily have more than 100 threads going but do you send your request to a single webserver? If so, that webserver might be a bottleneck, in which case a threadpool will help you set a maximum number of concurrent threads to better tune the overall performance of your application.
0
 

Author Closing Comment

by:lrbrister
ID: 39291320
Thanks
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question