473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

threads - how many ?

What is the maximum threads .net can open at one time ?

If there is a max , how do i increase it ?
Nov 23 '05 #1
5 1100
"James" <jk****@hotmail.com> schrieb:
What is the maximum threads .net can open at one time ?

If there is a max , how do i increase it ?

I am curious why you would want to know that. Creating high numbers of
threads doesn't make much sense, and better solutions with fewer threads can
be found.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #2
afaik

This depends on your systems resources ,

Michel Posseth

"James" <jk****@hotmail.com> wrote in message
news:uT**************@TK2MSFTNGP14.phx.gbl...
What is the maximum threads .net can open at one time ?

If there is a max , how do i increase it ?

Nov 23 '05 #3
i wrote a service that does threads pooling. Each threads represent a pc
derived from my pclist.txt

An organisation usually has more than 100++ pc, thus i need to know whethere
there is a limited number of threads
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
"James" <jk****@hotmail.com> schrieb:
What is the maximum threads .net can open at one time ?

If there is a max , how do i increase it ?

I am curious why you would want to know that. Creating high numbers of
threads doesn't make much sense, and better solutions with fewer threads
can be found.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #4
James,
I don't believe there is a maximum per se, at least one that you can
actually reach.

As m.posseth suggests, its based on system resources (# of physical &
logical CPUs, amount of memory, amoung other things).

It also depends on what the threads are doing, if they are waiting for IO,
then having 100s probably is not going to hurt anything. However if they are
CPU bound (such as Ray Tracing or calculating actuary tables) then having
more then one per physical/logical CPU is definitely a bad idea.

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"James" <jk****@hotmail.com> wrote in message
news:uT**************@TK2MSFTNGP14.phx.gbl...
| What is the maximum threads .net can open at one time ?
|
| If there is a max , how do i increase it ?
|
|
Nov 23 '05 #5
James,

You should reconsider your architecture. A solution that creates
threads unbounded is usually inferior to other solutions that only
require a fixed number of threads. In your case, there is a one-to-one
relationship with threads and PCs so the thread count will grow
unbounded depending on the number of entries in the pclist.txt file. A
better approach would be to use the ThreadPool class to queue work
items you may have for each pc. The ThreadPool class will manage the
dispatching of work items to a bounded number of threads in an
efficient manner

Brian

James wrote:
i wrote a service that does threads pooling. Each threads represent a pc
derived from my pclist.txt

An organisation usually has more than 100++ pc, thus i need to know whethere
there is a limited number of threads


Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Przemysław Różycki | last post by:
Hello, I have written some code, which creates many threads for each connection ('main connection'). The purpose of this code is to balance the load between several connections ('pipes'). The...
34
by: Kovan Akrei | last post by:
Hi, I would like to know how to reuse an object of a thread (if it is possible) in Csharp? I have the following program: using System; using System.Threading; using System.Collections; ...
9
by: Eric Sabine | last post by:
Can someone give me a practical example of why I would join threads? I am assuming that you would typically join a background thread with the UI thread and not a background to a background, but...
7
by: mircu | last post by:
Hello, What would be the best for implementing architecture that runs several, independent, scheduled or run by the user on demand task in the same time? Now in my program every task creates...
6
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C#. I am writing an application that communicates with a panel over ethernet, collects data and writes it to a file. The way the...
3
by: mjheitland | last post by:
Hi, I like to know how many threads are used by a Threading.Timer object. When I create a Threading.Timer object calling a short running method every 5 seconds I expected to have one additional...
10
by: cj | last post by:
I'm writing a TCP/IP server app that will have many simultaneous connections. The main thread listens for new connections and starts a thread to handle each requested connection. These are short...
7
by: Michael | last post by:
I'm writing an application that decodes a file containing binary records. Each record is a particular event type. Each record is translated into ASCII and then written to a file. Each file contains...
6
by: Alexander Walker | last post by:
Hello Is it inefficient to create an application that has many threads that individually may do a small amount of work over a given period of time as opposed to an application that has a...
9
by: jdlists | last post by:
I have inheirted some existing code, that i will explain in a moment, have needed to extend and ultimately should be able to run in threads. I've done a bunch of work with python but very little...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.