Skip to content

Commit 30607f4

Browse files
committed
Make default thread count to 'Corecount - 2'
Thanks to KingofBeast and Billy for the idea
1 parent b89f094 commit 30607f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FastDL Generator/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static int Main(string[] args)
3737
};
3838
string Path = "";
3939
string PathOutput = "";
40-
int Threads = 2;
40+
int Threads = Math.Max(Environment.ProcessorCount - 2, 2);
4141
int RunningThreads = 0;
4242

4343
// Parsing arguments
@@ -46,7 +46,7 @@ public static int Main(string[] args)
4646
Console.WriteLine("Usage: ");
4747
Console.WriteLine("fastdlgen.exe <path to addon dir> (output path) (Threads)");
4848
Console.WriteLine("If no output path is given it will be put into '<path to addon dir>/upload_dir'");
49-
Console.WriteLine("If no amount of Threads are given it will default to 2 threads.");
49+
Console.WriteLine($"If no amount of Threads are given it will default to {Threads} threads.");
5050
Console.WriteLine("The Output directory will always be cleaned.");
5151

5252
return 1;

0 commit comments

Comments
 (0)