[DatFile] Parallel hunting

This commit is contained in:
Matt Nadareski
2017-03-18 21:26:50 -07:00
parent c9c532776b
commit 23c5d9601d
8 changed files with 381 additions and 333 deletions

View File

@@ -1,5 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using SabreTools.Helper.Data;
@@ -460,10 +460,10 @@ namespace SabreTools.Helper.Dats
lock (_files)
{
int count = 0;
foreach (string key in _files.Keys)
Parallel.ForEach(_files.Keys, Globals.ParallelOptions, key =>
{
count += _files[key].Count;
}
});
return count;
}