Solved

Thread Limit

Posted on 2013-07-01
4
555 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

3 Use Cases for Connected Systems

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

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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…

777 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