473,398 Members | 2,812 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,398 software developers and data experts.

Change Thread pool limit

Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?
Thanks a lot,

objectref
Nov 17 '05 #1
5 2015
You can only do this in .NET 2.0 and above. You can call the new static
SetMaxThreads method on the ThreadPool class.

You should only tweak this if you really know what you are doing.
Usually, the system does an ok job with it.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"objectref" <ob*******@mediatrel.com> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl...
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?
Thanks a lot,

objectref

Nov 17 '05 #2
Not possible in .NET 1.x but 2.0.

"objectref" <ob*******@mediatrel.com> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl...
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?
Thanks a lot,

objectref

Nov 17 '05 #3
Usually requests like thes point to a flawed design or bad code. Mind
outlining the reason for such a request?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"objectref" <ob*******@mediatrel.com> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl...
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?
Thanks a lot,

objectref

Nov 17 '05 #4
objectref <ob*******@mediatrel.com> wrote:
can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?


I would suggest avoiding using the system threadpool altogether - it's
far too easy to deadlock. You could use a custom threadpool though.
There are plenty around, including my own, available from
http://www.pobox.com/~skeet/csharp/miscutil

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 17 '05 #5

Xmmm...hardcoded threads made by me, seems to slow a specific portion of my
code down.
The whole system also seems to behave more quickly when using a threadpool.

Never mind, thank a lot all the guys!

objectref

"Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
news:eB*************@tk2msftngp13.phx.gbl...
Usually requests like thes point to a flawed design or bad code. Mind
outlining the reason for such a request?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"objectref" <ob*******@mediatrel.com> wrote in message
news:uc**************@TK2MSFTNGP15.phx.gbl...
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i
can
change the ThreadPool limit
from 25 to something else ?
Thanks a lot,

objectref


Nov 17 '05 #6

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

Similar topics

3
by: David Sworder | last post by:
This message was already cross-posted to C# and ADO.NET, but I forgot to post to this "general" group... sorry about that. It just occured to me after my first post that the "general" group readers...
31
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
7
by: David Sworder | last post by:
Hi, I'm developing an application that will support several thousand simultaneous connections on the server-side. I'm trying to maximize throughput. The client (WinForms) and server communicate...
1
by: ramneekm | last post by:
hi all, i am working on a asp.net web app and using ado.net 's SqlClient Data Provider to connect to sqlserver 2005. I am getting the exception "Timeout expired. The timeout period elapsed...
3
by: Kevin | last post by:
Using this: http://msdn2.microsoft.com/en-us/library/3dasc8as(VS.80).aspx as an example I have a question concerning the reuse of objects. In the example 10 instances of the Fibonacci class...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
7
by: Curious | last post by:
On Jun 10, 3:32 am, <s...@dailycoding.comwrote: Thanks! I'll use thread pool.
23
by: =?GB2312?B?0rvK18qr?= | last post by:
Hi all, Recently I had a new coworker. There is some dispute between us. The last company he worked for has a special networking programming model. They split the business logic into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.