Fix some ToDos, parallelization problems.

This commit is contained in:
Ottermandias 2023-07-03 16:39:34 +02:00
parent 0ed94676ed
commit 8ea6893fc3
15 changed files with 50 additions and 41 deletions

View file

@ -290,7 +290,7 @@ internal sealed class ObjectIdentification : DataSharer, IObjectIdentifier
var options = new ParallelOptions()
{
MaxDegreeOfParallelism = Environment.ProcessorCount / 2,
MaxDegreeOfParallelism = Math.Max(1, Environment.ProcessorCount / 2),
};
Parallel.ForEach(gameData.GetExcelSheet<BNpcBase>(language)!.Where(b => b.RowId < BnpcNames.Count), options, bNpc =>