Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Thread Limit

Posted on 2013-07-01
4
Medium Priority
?
573 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

926 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