Skip to content

Commit 1c7c71f

Browse files
authored
Merge pull request #52 from Avibah/indev
Fix maps failing to import on systems with less than 4 threads
2 parents a60d1c9 + 50a09a8 commit 1c7c71f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/map/MapParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ await Task.Run(() =>
4040
var maps = new ConcurrentBag<Map>();
4141

4242
Callable.From(() => Instance.EmitSignal(SignalName.MapsImportStarted)).CallDeferred();
43-
Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = System.Environment.ProcessorCount / 4 }, file =>
43+
Parallel.ForEach(files, new ParallelOptions { MaxDegreeOfParallelism = Math.Max(System.Environment.ProcessorCount / 4, 1) }, file =>
4444
{
4545
try
4646
{

0 commit comments

Comments
 (0)