I can't find anywhere on the internet what is the "formula" behind max thread numbers. I have tested the logic that I have read with cpu, virtual memory and ram memory and in any case I used results were always the same in .NET 4.5. But when I dropped version of .NET Framework to 2.0 I noticed there is a logic that max number of threads you can create by default is 250 per cpu core. But I can't find out what logic lies behind .NET 4.5. I doubt that OS defines it just because it is different result with different .NET versions.
Asked
Active
Viewed 34 times
0
-
3You don't really want to know. Much more imporant: Optimal number of threads ≈ number of CPUs – H H Mar 30 '18 at 20:48
-
@HenkHolterman Unless threads are blocked by IO.. – Eser Mar 30 '18 at 20:51
-
@Eser - yes, that's why we still see much higher numbers. Far from optimal. `async/await` is a cure. – H H Mar 30 '18 at 20:52
-
Yea but I am not asking about optimal. Yes I want to know. That's the point of my question :) – Ryukote Mar 30 '18 at 23:29
-
The linked dupe talks about maximum. Do read the Raymond Chen article. – H H Mar 31 '18 at 10:17